Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        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);
        }