private void SetBookMark_Click(object sender, RoutedEventArgs e) { ConfigHelper.AddConfig( new ConfigData(false, BrowserCore.CefBrowser.Title, BrowserCore.CefBrowser.Address, StdApi.LocalTime), FilePath.BookMarkPath); }
static void Main(string[] args) { Serilog.ILogger logger = new LoggerConfiguration() .WriteTo.Console() .CreateLogger(); IFeatureToggle featureToggle = new FeatureToggles(); //string specificationId = "a1fe8998-406b-44b8-92c7-502a560e7b6e"; ////string providerId = "10027545"; //string providerId = "10004758"; string specificationId = "b1952bc1-4ed9-4ae1-b29d-c72d8d22e830"; //string providerId = "10027545"; string providerId = "10063088"; IConfigurationRoot config = ConfigHelper.AddConfig(); EngineSettings engineSettings = new EngineSettings(); CosmosDbSettings dbSettings = new CosmosDbSettings(); config.Bind("CosmosDbSettings", dbSettings); dbSettings.CollectionName = "providerdatasets"; CosmosRepository calcsCosmosRepostory = new CosmosRepository(dbSettings); IProviderSourceDatasetsRepository providerSourceDatasetsRepository = new ProviderSourceDatasetsRepository(calcsCosmosRepostory, engineSettings); RedisSettings redisSettings = new RedisSettings(); config.Bind("redisSettings", redisSettings); ICacheProvider cacheProvider = new StackExchangeRedisClientCacheProvider(redisSettings); ApiOptions apiOptions = new ApiOptions(); config.Bind("resultsClient", apiOptions); ICorrelationIdProvider correlationIdProvider = new CorrelationIdProvider(); IResultsApiClientProxy resultsApi = new ResultsApiProxy(apiOptions, logger, correlationIdProvider); IMapper mapper = new MapperConfiguration(c => { c.AddProfile <ProviderMappingProfile>(); }).CreateMapper(); ProviderService providerService = new ProviderService(cacheProvider, resultsApi, mapper); FilesystemCacheProviderService filesystemCacheProviderService = new FilesystemCacheProviderService(providerService); AllocationModelDebugRunner debugger = new AllocationModelDebugRunner(logger, featureToggle, providerSourceDatasetsRepository, filesystemCacheProviderService); (IEnumerable <Models.Results.CalculationResult> calculationResults, long ms) = debugger.Execute(specificationId, providerId).Result; CalculationRunSummaryGenerator summaryGenerator = new CalculationRunSummaryGenerator(); summaryGenerator.GenerateSummary(calculationResults, ms, specificationId, providerId); }
private void Check(object sender, FrameLoadEndEventArgs e) { Dispatcher.BeginInvoke((Action) delegate() { LoadProgressBar.Value = 100; LoadProgressBar.Visibility = Visibility.Collapsed; label1.Content = "加载完成"; if (NoLogs.IsChecked != true) { ConfigHelper.AddConfig(new ConfigData(false, cwb.Title, cwb.Address, StdApi.LocalTime), FilePath.HistoryPath); } if (CivilizedLanguage.CheckIfNotCivilized(StdApi.CefPageSource) == true) { label2.Visibility = Visibility.Visible; } if ((UrlTextBox.Text.Contains("/Error.html?errorCode=") || UrlTextBox.Text.Contains("\\Error.html?errorCode=")) == true) { UrlTextBox.Text = "easy://errorPage"; } }); }
public static IServiceProvider RegisterComponents(IServiceCollection builder, IConfiguration azureFuncConfig = null) { IConfigurationRoot config = ConfigHelper.AddConfig(azureFuncConfig); return(RegisterComponents(builder, config)); }