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 Subscribe(T subscriber) where T : class, IEvent;
///
///
///
///
///
void Unsubscribe(T subscriber) where T : class, 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;
}