using System.ComponentModel; using GFramework.Core.command; using GFramework.Core.events; using GFramework.Core.ioc; using GFramework.Core.logging; using GFramework.Core.model; using GFramework.Core.query; using GFramework.Core.system; using GFramework.Core.utility; namespace GFramework.Core.architecture; public class DefaultArchitectureContext( IIocContainer container, ITypeEventSystem typeEventSystem, ILogger logger) : IArchitectureContext { private readonly ITypeEventSystem _typeEventSystem = typeEventSystem; public ILogger Logger { get; } = logger; #region Component Retrieval /// /// 从IOC容器中获取指定类型的系统实例 /// /// 目标系统类型 /// 对应的系统实例 public TSystem? GetSystem() where TSystem : class, ISystem { return container.Get(); } /// /// 从IOC容器中获取指定类型的模型实例 /// /// 目标模型类型 /// 对应的模型实例 public TModel? GetModel() where TModel : class, IModel { return container.Get(); } /// /// 从IOC容器中获取指定类型的工具实例 /// /// 目标工具类型 /// 对应的工具实例 public TUtility? GetUtility() where TUtility : class, IUtility { return container.Get(); } #endregion public void SendCommand(ICommand command) { throw new NotImplementedException(); } public TResult SendCommand(ICommand command) { throw new NotImplementedException(); } public TResult SendQuery(IQuery query) { throw new NotImplementedException(); } public void SendEvent() { throw new NotImplementedException(); } public void SendEvent(TEvent e) { throw new NotImplementedException(); } public IUnRegister RegisterEvent(Action handler) { throw new NotImplementedException(); } }