Beispiel #1
0
        public static void WebStart(IApplicationBuilder app, IWebHostEnvironment env, IHostApplicationLifetime lifetime)
        {
            SignumServer.Start(app, env, typeof(Startup).Assembly);

            AuthServer.Start(app, () => Starter.Configuration.Value.AuthTokens, "IMPORTANT SECRET FROM AtTest. CHANGE THIS STRING!!!");
            CacheServer.Start(app);
            FilesServer.Start(app);
            UserQueryServer.Start(app);
            DashboardServer.Start(app);
            WordServer.Start(app);
            ExcelServer.Start(app);
            ChartServer.Start(app);
            MapServer.Start(app);
            ToolbarServer.Start(app);
            TranslationServer.Start(app, new AlreadyTranslatedTranslator(new AzureTranslator("Your API Key for Azure Translate")));
            SchedulerServer.Start(app, lifetime);
            ProcessServer.Start(app);
            MailingServer.Start(app);
            ProfilerServer.Start(app);
            DiffLogServer.Start(app);
            PredictorServer.Start(app);
            OmniboxServer.Start(app,
                                new EntityOmniboxResultGenenerator(),
                                new DynamicQueryOmniboxResultGenerator(),
                                new ChartOmniboxResultGenerator(),
                                new DashboardOmniboxResultGenerator(DashboardLogic.Autocomplete),
                                new UserQueryOmniboxResultGenerator(UserQueryLogic.Autocomplete),
                                new UserChartOmniboxResultGenerator(UserChartLogic.Autocomplete),
                                new MapOmniboxResultGenerator(type => OperationLogic.TypeOperations(type).Any()),
                                new ReactSpecialOmniboxGenerator()
                                   //new HelpModuleOmniboxResultGenerator(),
                                ); //Omnibox

            SignumCultureSelectorFilter.GetCurrentCulture = (ctx) => GetCulture(ctx);
        }
Beispiel #2
0
        public static void WebStart(HttpConfiguration config)
        {
            SignumServer.Start(config, typeof(Global).Assembly);
            AuthServer.Start(config, () => Starter.Configuration.Value.AuthTokens, "IMPORTANT SECRET FROM Southwind. CHANGE THIS STRING!!!");
            CacheServer.Start(config);
            FilesServer.Start(config);
            UserQueryServer.Start(config);
            DashboardServer.Start(config);
            WordServer.Start(config);
            ExcelServer.Start(config);
            ChartServer.Start(config);
            MapServer.Start(config);
            TranslationServer.Start(config, new AlreadyTranslatedTranslator(new BingTranslator()));
            SchedulerServer.Start(config);
            ProcessServer.Start(config);
            DisconnectedServer.Start(config);
            MailingServer.Start(config);
            ProfilerServer.Start(config);
            DiffLogServer.Start(config);

            OmniboxServer.Start(config,
                                new EntityOmniboxResultGenenerator(),
                                new DynamicQueryOmniboxResultGenerator(),
                                new ChartOmniboxResultGenerator(),
                                new DashboardOmniboxResultGenerator(DashboardLogic.Autocomplete),
                                new UserQueryOmniboxResultGenerator(UserQueryLogic.Autocomplete),
                                new UserChartOmniboxResultGenerator(UserChartLogic.Autocomplete),
                                new MapOmniboxResultGenerator(type => OperationLogic.TypeOperations(type).Any()),
                                new ReactSpecialOmniboxGenerator()
                                   //new HelpModuleOmniboxResultGenerator(),
                                ); //Omnibox
        }
Beispiel #3
0
        public bool Startup()
        {
            DB_Map    map; string[] list;
            MapServer mapServer; int id;

            if (Load())
            {
                if (Configs.Get <bool>(Configs.Server_Master))
                {
                    (_master = new MasterServer()).Start();
                }
                if (Configs.Get <bool>(Configs.Server_Characters))
                {
                    (_characters = new CharServer()).Start();
                }
                if (Configs.Get <bool>(Configs.Server_AllMaps))
                {
                    foreach (var item in DataMgr.SelectAllMaps())
                    {
                        _maps.Add(mapServer = new MapServer(item));
                        mapServer.Start();
                    }
                }
                else
                {
                    list = Configs.Get <string>(Configs.Server_MapList).Split(';');
                    foreach (var item in list)
                    {
                        if (int.TryParse(item, out id) && DataMgr.Select(id, out map))
                        {
                            _maps.Add(mapServer = new MapServer(map));
                            mapServer.Start();
                        }
                    }
                }
                IsRunning = true;
                InitializeCMD();
                return(true);
            }
            return(false);
        }
 public async Task <bool> Startup()
 {
     if (await LoadAsync())
     {
         if (Configs.Get <bool>(Configs.Server_Master))
         {
             (_master = new MasterServer()).Start();
         }
         if (Configs.Get <bool>(Configs.Server_Characters))
         {
             (_characters = new CharServer()).Start();
         }
         if (Configs.Get <bool>(Configs.Server_AllMaps))
         {
             foreach (var item in DataMgr.SelectAllMaps())
             {
                 var mapServer = new MapServer(item);
                 _maps.Add(mapServer = new MapServer(item));
                 mapServer.Start();
             }
         }
         else
         {
             var list = Configs.Get <string>(Configs.Server_MapList).Split(';');
             foreach (var item in list)
             {
                 if (int.TryParse(item, out var id) && DataMgr.Select(id, out DB_Map map))
                 {
                     var mapServer = new MapServer(map);
                     _maps.Add(mapServer);
                     mapServer.Start();
                 }
             }
         }
         IsRunning = true;
         InitializeCMD();
         return(true);
     }
     return(false);
 }