using System; namespace Stary.Evo { public interface IArchitecture { /// /// 注册 System /// void RegisterSystem(T instance) where T : ISystem; /// /// 获取 System /// T GetSystem() where T : class, ISystem; /// /// 注册 Data /// void RegisterData(T instance) where T : IData; /// /// 获取 Data /// /// /// T GetData() where T : class, IData; /// /// 注册 Utility /// void RegisterUtility(T instance) where T : IUtility; /// /// 获取 Utility /// T GetUtility() where T : class, IUtility; /// /// 发送命令 /// void SendCommand() where T : ICommand, new(); /// /// 发送命令 /// void SendCommand(T command) where T : ICommand; /// /// 事件发送 /// /// public void SendEvent(TEvent key) where TEvent : IConvertible; /// /// 事件发送 /// /// public void SendEvent(TEvent key, Tvalue1 value) where TEvent : IConvertible; /// /// 事件发送 /// /// public void SendEvent(TEvent key, Tvalue1 value1, Tvalue2 value2) where TEvent : IConvertible; /// /// 事件发送 /// /// public void SendEvent(TEvent key, Tvlue1 value1, Tvlue2 vlue2, Tvlue3 vlue3) where TEvent : IConvertible; /// /// 事件发送 /// /// public void SendEvent(TEvent key, object[] values) where TEvent : IConvertible; /// /// 事件监听 /// /// /// /// public IUnRegister RegisterEvent(TEvent key, Action onEvent) where TEvent : IConvertible; /// /// 事件监听 /// /// /// /// public IUnRegister RegisterEvent(TEvent key, Action onEvent) where TEvent : IConvertible; /// /// 事件监听 /// /// /// /// public IUnRegister RegisterEvent(TEvent key, Action onEvent) where TEvent : IConvertible; /// /// 事件监听 /// /// /// /// public IUnRegister RegisterEvent(TEvent key, Action onEvent) where TEvent : IConvertible; /// /// 事件监听 /// /// /// /// public IUnRegister RegisterEvent(TEvent key, Action onEvent) where TEvent : IConvertible; /// /// 事件销毁 /// /// /// public void UnRegisterEvent(TEvent key, Action onEvent) where TEvent : IConvertible; /// /// 事件销毁 /// /// /// public void UnRegisterEvent(TEvent key, Action onEvent) where TEvent : IConvertible; /// /// 事件销毁 /// /// /// public void UnRegisterEvent(TEvent key, Action onEvent) where TEvent : IConvertible; /// /// 事件销毁 /// /// /// /// /// /// /// public void UnRegisterEvent(TEvent key, Action onEvent) where TEvent : IConvertible; /// /// 事件销毁 /// /// /// /// /// public void UnRegisterEvent(TEvent key, Action onEvent) where TEvent : IConvertible; /// /// 事件发送 /// /// public void SendEvent(string key); /// /// 事件发送 /// /// public void SendEvent(string key, Tvalue1 value) where Tvalue1 : class; /// /// 事件发送 /// /// public void SendEvent(string key, Tvalue1 value1, Tvalue2 value2) where Tvalue1 : class where Tvalue2 : class; /// /// 事件发送 /// /// public void SendEvent(string key, Tvalue1 value1, Tvalue2 value2, Tvalue3 value3) where Tvalue1 : class where Tvalue2 : class where Tvalue3 : class; /// /// 事件发送 /// /// public void SendEvent(string key, object[] values); /// /// 事件监听 /// /// /// /// public IUnRegister RegisterEvent(string key, Action onEvent); /// /// 事件监听 /// /// /// /// public IUnRegister RegisterEvent(string key, Action onEvent) where Tvalue1 : class; /// /// 事件监听 /// /// /// /// public IUnRegister RegisterEvent(string key, Action onEvent) where Tvalue1 : class where Tvalue2 : class; /// /// 事件监听 /// /// /// /// public IUnRegister RegisterEvent(string key, Action onEvent) where Tvalue1 : class where Tvalue2 : class where Tvalue3 : class; /// /// 事件监听 /// /// /// /// public IUnRegister RegisterEvent(string key, Action onEvent); /// /// 事件销毁 /// /// /// public void UnRegisterEvent(string key, Action onEvent); /// /// 事件销毁 /// /// /// public void UnRegisterEvent(string key, Action onEvent) where Tvalue1 : class; /// /// 事件销毁 /// /// /// public void UnRegisterEvent(string key, Action onEvent) where Tvalue1 : class where Tvalue2 : class; /// /// 事件销毁 /// /// /// public void UnRegisterEvent(string key, Action onEvent) where Tvalue1 : class where Tvalue2 : class where Tvalue3 : class; /// /// 事件销毁 /// /// /// public void UnRegisterEvent(string key, Action onEvent); TResult SendQuery(IQuery query); void OnDispose(); } }