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); }
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 }
public DashboardTestFixture(bool cleanStorageAccount, string connectionString = null) { // "DashboardSiteExtensionLocation" should point to a root site extension directory (unzipped), // which is the directory where the "extension.xml" file lives. string dashboardLocation = GetFromConfigOrEnvironmentOrDefault("DashboardSiteExtensionLocation"); dashboardLocation = Directory.GetDirectories(dashboardLocation, "?.*.*").SingleOrDefault(); if (string.IsNullOrEmpty(dashboardLocation)) { throw new Exception("Unable to find Dashboard site extension. Make sure you've configured 'DashboardSiteExtensionLocation' correctly."); } _storage = new WebJobsStorageAccount(GetFromConfigOrEnvironmentOrDefault("StorageAccount")); _serviceBusAccount = GetFromConfigOrEnvironmentOrDefault("ServiceBusAccount"); if (cleanStorageAccount) { _storage.Empty(); } if (connectionString == null) { connectionString = _storage.ConnectionString; } _server = new DashboardServer(dashboardLocation, connectionString); _server.Start(); }
public void ServesR3ETelemetryEndpoint() { using var server = new DashboardServer(TestLogger, new DashboardServer.Config(IPAddress.Any, _serverPort)); Assert.True(server.Start(), "Server did not start"); using var client = new JsonWsClient(Timeout, _serverPort, "/r3e"); var telemetry = gtFaker.Generate(); Assert.True(client.ConnectAndWait(), "Client could not connect"); server.Multicast(telemetry); var message = client.NextJson(); Assert.Equal(System.Text.Json.JsonValueKind.Number, message.Path("VersionMajor").ValueKind); Assert.Equal(System.Text.Json.JsonValueKind.Number, message.Path("VersionMinor").ValueKind); }