public object SystemInfo() { IServiceProvider provider = HttpContext.RequestServices; dynamic info = new ExpandoObject(); IHybridModuleManager moduleManager = provider.GetRequiredService <IHybridModuleManager>(); info.Modules = moduleManager.SourceModules.OrderBy(m => m.Level).ThenBy(m => m.Order).ThenBy(m => m.GetType().FullName).Select(m => new { m.GetType().Name, Class = m.GetType().FullName, Level = m.Level.ToString(), m.Order, m.IsEnabled }).ToList(); string cliVersion = AssemblyExtensions.GetCliVersion(); string hybridVersion = Assembly.GetExecutingAssembly().GetProductVersion(); info.Object = new { Message = "WebApi 数据服务已启动", CliVersion = cliVersion, HybridVersion = hybridVersion }; return(info); }
public object SystemInfo() { IServiceProvider provider = HttpContext.RequestServices; dynamic info = new ExpandoObject(); info.Packs = provider.GetAllPacks().Select(m => new { m.GetType().Name, Class = m.GetType().FullName, Level = m.Level.ToString(), m.Order, m.IsEnabled }).ToList(); string cliVersion = AssemblyExtensions.GetCliVersion(); string hybridVersion = Assembly.GetExecutingAssembly().GetProductVersion(); info.Object = new { Message = "WebApi 数据服务已启动", CliVersion = cliVersion, HybridVersion = hybridVersion }; return(info); }