当前位置: 首页>>代码示例>>C#>>正文


C# IConfiguration.AllSettings方法代码示例

本文整理汇总了C#中IConfiguration.AllSettings方法的典型用法代码示例。如果您正苦于以下问题:C# IConfiguration.AllSettings方法的具体用法?C# IConfiguration.AllSettings怎么用?C# IConfiguration.AllSettings使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在IConfiguration的用法示例。


在下文中一共展示了IConfiguration.AllSettings方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Start

        public void Start()
        {
            lock (_padlock)
            {
                Logger.WriteDebug("Starting autotest.net engine");
                BootStrapper.SetBuildConfiguration(
                    new BuildConfiguration((original, @new) => {
                        var detector = new PublicContractChangeDetector();
                        var changes = detector.GetAllPublicContractChangesBetween(original, @new).ToArray();
                        var optimisticBuildPossible = changes.Length == 0;
                        if (!optimisticBuildPossible)
                        {
                            Debug.WriteDebug("Optimistic build changes");
                            foreach (var change in changes)
                                Debug.WriteDebug("\t" + change.ItemChanged);
                        }
                        return optimisticBuildPossible;
                    }));
                BootStrapper.Configure(_writeLocator);
                Logger.WriteDebug("Setting up log writer");
                Logger.SetWriter(BootStrapper.Services.Locate<IWriteDebugInfo>());
                BootStrapper.Container.Register(Component.For<IMessageProxy>()
                                                                .Forward<IConsumerOf<AssembliesMinimizedMessage>>()
                                                                .Forward<IConsumerOf<AbortMessage>>()
                                                                .ImplementedBy<AutoTestMessageProxy>().LifeStyle.Singleton);
                BootStrapper.Container.Register(Component.For<IPreProcessTestruns>().ImplementedBy<MinimizingPreProcessor>().LifeStyle.Singleton);
                BootStrapper.Container.Register(Component.For<IPreProcessBuildruns>().ImplementedBy<MinimizingBuildPreProcessor>());
                BootStrapper.Container.Register(Component.For<IPreProcessBuildruns>().Forward<IPreProcessTestruns>().ImplementedBy<OnDemanTestrunPreprocessor>().LifeStyle.Singleton);
                BootStrapper.Container.Register(Component.For<IPreProcessBuildruns>().ImplementedBy<RealtimeChangePreProcessor>().LifeStyle.Singleton);
                BootStrapper.Container.Register(Component.For<IConsumerOf<FileChangeMessage>>().ImplementedBy<RecursiveRunCauseConsumer>().Named("RecursiveRunConsumer"));
                BootStrapper.Container.Register(Component.For<ICustomIgnoreProvider>().ImplementedBy<IgnoreProvider>());
                Logger.WriteDebug("Setting up message proxy");
                _proxy = BootStrapper.Services.Locate<IMessageProxy>();
                _proxy.SetMessageForwarder(_server);
                _proxy.RunStarted += _proxy_RunStarted;
                _proxy.RunFinished += _proxy_RunFinished;
                _configuration = BootStrapper.Services.Locate<IConfiguration>();
                if (_configuration.DebuggingEnabled)
                    Logger.EnableWriter();
                Logger.WriteDebug("Checking license");
                if (licenseIsInvalid())
                    return;

                _realtimeChangeTracker = new ChangeTracker(getRealtimeRunPreprocessor(), _configuration, BootStrapper.Services.Locate<IMessageBus>(), BootStrapper.Services.Locate<IGenerateBuildList>());
                Logger.WriteDebug("Setting up cache");
                var runCache = BootStrapper.Services.Locate<IRunResultCache>();
                runCache.EnabledDeltas();
                BootStrapper.InitializeCache(_watchPath);
                _watcher = BootStrapper.Services.Locate<IDirectoryWatcher>();
                Logger.WriteDebug("Looking for config in "+_localConfigLocation);
                _watcher.LocalConfigurationIsLocatedAt(_localConfigLocation);
                _watcher.Watch(_watchPath);
                _configuration.ValidateSettings();
                _configuredCustomOutput = _configuration.CustomOutputPath;
                var disableAll = _configuration.AllSettings("mm-AllDisabled").ToLower().Equals("true");
                StartedPaused = _configuration.StartPaused || disableAll;
                _isPaused = StartedPaused;
                setCustomOutputPath();
                var minimizer = getMinimizer();
                minimizer.ProfilerCompletedUpdate += minimizer_ProfilerCompletedUpdate;
                minimizer.ProfilerInitialized += minimizer_ProfilerInitialized;
                minimizer.MinimizerInitialized += minimizer_MinimizerInitialized;
                minimizer.ProfilingStarted += (sender, e) => _server.Send(new ProfiledTestRunStarted());
                minimizer.ProfilerLoadError += profiler_profilercorrupted;
                minimizer.SetManualUpdateProvider(() => _isPaused);
                initializeAllForPreProcessor(minimizer);
                if (disableAll)
                    Pause();
                IsRunning = true;
            }
        }
开发者ID:jeroldhaas,项目名称:ContinuousTests,代码行数:71,代码来源:ATEngine.cs

示例2: MinimizingPreProcessor

 public MinimizingPreProcessor(ICache cache, IRunResultCache resultCache, IConfiguration configuration, IOptimizeBuildConfiguration buildOptimizer, IMessageBus bus, ITestRunner[] runners)
 {
     _cache = cache;
     _resultCache = resultCache;
     _configuration = configuration;
     _buildOptimizer = buildOptimizer;
     _bus = bus;
     _runner = (AutoTestTestRunner)runners.First(x => x.GetType().Name.Equals("AutoTestTestRunner"));
     _minimizer = new TestMinimizer(configuration.AllSettings("mm-MinimizerDebug") == "true", 1);
     _profilerData = new ProfilerData(GetDBName(), new BinaryFileProfilerDataParser(), new ForEveryFixtureConstructorOrFixtureChangeContextChangeFinder());
     _profilerData.DebugMessage += _profilerData_DebugMessage;
     Logger.WriteDebug("Minimizing PreProc Created");
 }
开发者ID:jeroldhaas,项目名称:ContinuousTests,代码行数:13,代码来源:MinimizingPreProcessor.cs


注:本文中的IConfiguration.AllSettings方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。