using System; using System.Reflection; using Barotrauma.LuaCs.Events; using Barotrauma.LuaCs.Services.Compatibility; using Barotrauma.LuaCs.Services.Safe; namespace Barotrauma.LuaCs.Services; public interface IEventService : IReusableService, ILuaEventService { FluentResults.Result SetLegacyLuaRunnerFactory(Func runnerFactory) where T : IEvent; void RemoveLegacyLuaRunnerFactory() where T : IEvent; void SetAliasToEvent(string alias) where T : IEvent; void RemoveEventAlias(string alias); void RemoveAllEventAliases() where T : IEvent; /// /// /// /// /// /// FluentResults.Result Subscribe(T subscriber) where T : IEvent; /// /// /// /// /// void Unsubscribe(T subscriber) where T : IEvent; /// /// Clears all subscribers for a given event type and removes any registration to the type. /// /// The event type. void ClearAllEventSubscribers() where T : IEvent; /// /// Clears all subscribers lists. /// void ClearAllSubscribers(); /// /// Invokes all alive subscribers of the given event using the provided invocation factory. /// /// /// /// FluentResults.Result PublishEvent(Action action) where T : IEvent; }