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


C# IConfigurationManager类代码示例

本文整理汇总了C#中IConfigurationManager的典型用法代码示例。如果您正苦于以下问题:C# IConfigurationManager类的具体用法?C# IConfigurationManager怎么用?C# IConfigurationManager使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: UrlController

        public UrlController(IConfigurationManager configurationManager,
            IConfigurationRepository configRepository, 
            IFrontMatterRepository frontMatterRepository,
            IMarkupProcessorFactory markupProcessorFactory)
            : base(configurationManager)
        {
            if (configRepository == null)
            {
                throw new ArgumentNullException("configRepository");
            }

            if (frontMatterRepository == null)
            {
                throw new ArgumentNullException("frontMatterRepository");
            }

            if (markupProcessorFactory == null)
            {
                throw new ArgumentNullException("markupProcessorFactory");
            }

            ConfigRepository = configRepository;
            FrontMatterRepository = frontMatterRepository;
            MarkupProcessorFactory = markupProcessorFactory;
        }
开发者ID:typeset,项目名称:typeset,代码行数:25,代码来源:UrlController.cs

示例2: FileReport

        public FileReport(IConfigurationManager configurationManager, IFileManager fileManager)
        {
            _configurationManager = configurationManager;
            _fileManager = fileManager;

            InitializeComponent();
        }
开发者ID:jrbdeveloper,项目名称:SafeFolder,代码行数:7,代码来源:FileReport.cs

示例3: DiagnosticsManager

		internal DiagnosticsManager(IDebugLogService logService, IEventBus eventBus, IConfigurationManager configurationManager, ILogger logger)
		{
			_logService = logService;
			_configurationManager = configurationManager;
			eventBus.Subscribe<ErrorEvent>(HandleErrorEvent);
		    _logger = logger;
		}
开发者ID:Donky-Network,项目名称:DonkySDK-Xamarin-Modular,代码行数:7,代码来源:DiagnosticsManager.cs

示例4: TraceLogger

        public TraceLogger(IConfigurationManager logConfig)
        {
            ArgumentValidator.ValidateNonNullReference(logConfig,"logConfig","TraceLogger.Ctor()");

            this._traceSource = new TraceSource(TraceSourceName) { Switch = new SourceSwitch(TraceSwitchName) };
            LogLevel logLevel;
            Enum.TryParse(logConfig.SystemConfiguration["LogLevel"], out logLevel);

            switch (logLevel)
            {
                case LogLevel.Off:
                    this._traceSource.Switch.Level = SourceLevels.Off;
                    break;
                case LogLevel.Critical:
                    this._traceSource.Switch.Level = SourceLevels.All;
                    break;
                case LogLevel.Error:
                    this._traceSource.Switch.Level = SourceLevels.Critical | SourceLevels.Error;
                    break;
                case LogLevel.Warning:
                    this._traceSource.Switch.Level = SourceLevels.Critical | SourceLevels.Error | SourceLevels.Warning;
                    break;
                case LogLevel.Information:
                    this._traceSource.Switch.Level = SourceLevels.Critical | SourceLevels.Error | SourceLevels.Warning | SourceLevels.Information;
                    break;
                case LogLevel.Verbose:
                    this._traceSource.Switch.Level = SourceLevels.Critical | SourceLevels.Error | SourceLevels.Warning | SourceLevels.Information | SourceLevels.Verbose;
                    break;
            }
        }
开发者ID:rajvarma,项目名称:Sagetest,代码行数:30,代码来源:TraceLogger.cs

示例5: ThreadManager

 public ThreadManager(IConfigurationManager<ConfigKey> configManager)
 {
     var threads = configManager.GetIntValue(ConfigKey.Threads);
     _maxThreads = threads > 0 ? threads : (int?)null;
     _runningThreads = 0;
     _lock = new object();
 }
开发者ID:jpb12,项目名称:auto-merger,代码行数:7,代码来源:ThreadManager.cs

示例6: BlogPostController

 public BlogPostController(IMvcLogger logger, IAsyncDocumentSession documentSession, IConfigurationManager configManager, AkismetClient akismetClient, IMappingEngine mapper)
     : base(logger, documentSession)
 {
     _configManager = configManager;
     _akismetClient = akismetClient;
     _mapper = mapper;
 }
开发者ID:prashantkhandelwal,项目名称:Bloggy,代码行数:7,代码来源:BlogPostController.cs

示例7: InternalDirectShowPlayer

        //public URCOMLoader PrivateCom
        //{
        //    get
        //    {
        //        return _privateCom;
        //    }
        //}

        public InternalDirectShowPlayer(
            ILogManager logManager
            , MainBaseForm hostForm
            //, IPresentationManager presentation
            //, ISessionManager sessionManager
            , IApplicationPaths appPaths
            , IIsoManager isoManager
            //, IUserInputManager inputManager
            , IZipClient zipClient
            , IHttpClient httpClient, IConfigurationManager configurationManager)
        {
            _logger = logManager.GetLogger("InternalDirectShowPlayer");
            _hostForm = hostForm;
            //_presentation = presentation;
            //_sessionManager = sessionManager;
            _httpClient = httpClient;
            _config = configurationManager;
            _isoManager = isoManager;
            //_inputManager = inputManager;
            _zipClient = zipClient;

            var config = GetConfiguration();

            config.VideoConfig.SetDefaults();
            config.AudioConfig.SetDefaults();
            config.SubtitleConfig.SetDefaults();
            config.COMConfig.SetDefaults();

            //use a static object so we keep the libraries in the same place. Doesn't usually matter, but the EVR Presenter does some COM hooking that has problems if we change the lib address.
            //if (_privateCom == null)
            //    _privateCom = new URCOMLoader(_config, _zipClient);
            URCOMLoader.Instance.Initialize(appPaths.ProgramDataPath, _zipClient, logManager, configurationManager);

            EnsureMediaFilters(appPaths.ProgramDataPath);
        }
开发者ID:kabellrics,项目名称:Emby.Theater.Windows,代码行数:43,代码来源:InternalDirectShowPlayer.cs

示例8: TextToSpeechNotifier

        public TextToSpeechNotifier(ISpeechLibrary speechLibrary,
		                            IConfigurationManager<TextToSpeechConfiguration> configurationManager)
        {
            _speechLibrary = speechLibrary;
            _configurationManager = configurationManager;
            _configFileInfo = new FileInfo(_configFileName);
        }
开发者ID:davidadsit,项目名称:TeamFoundationServerDesktopBuildMonitor,代码行数:7,代码来源:TextToSpeechNotifier.cs

示例9: CheckoutOrUpdate

        public static void CheckoutOrUpdate(HttpApplication context, IConfigurationManager configurationManager, IRepositoryManager repositoryManager)
        {
            if (configurationManager == null)
            {
                throw new ArgumentNullException("configurationManager");
            }

            if (repositoryManager == null)
            {
                throw new ArgumentNullException("repositoryManager");
            }

            var repositoryUri = configurationManager.AppSettings["SiteRepositoryUri"];
            var path = configurationManager.AppSettings["SitePath"];
            if (!Path.IsPathRooted(path))
            {
                path = context.Server.MapPath(path);
            }

            try
            {
                repositoryManager.CheckoutOrUpdate(repositoryUri, path);
            }
            catch { }
        }
开发者ID:typeset,项目名称:typeset,代码行数:25,代码来源:SiteRepositoryConfig.cs

示例10: MenuPresenter

 public MenuPresenter(IMenuView view, IRepositoryFactory repositoryFactory, IConfigurationManager configurationManager, INavigator navigator)
 {
     _view = view;
     _repositoryFactory = repositoryFactory;
     _navigator = navigator;
     _configurationManager = configurationManager;
 }
开发者ID:galievruslan,项目名称:mss-mobile,代码行数:7,代码来源:MenuPresenter.cs

示例11: DefaultModuleManager

 public DefaultModuleManager(IIocManager iocManager, IModuleFinder moduleFinder, IConfigurationManager configurationManager)
 {
     _modules = new ModuleCollection();
     _iocManager = iocManager;
     _moduleFinder = moduleFinder;
     _configurationManager = configurationManager;
 }
开发者ID:dingsongjie,项目名称:LancheProject,代码行数:7,代码来源:DefaultModuleManager.cs

示例12: Initialize

        public virtual void Initialize(IDependencyResolver resolver)
        {
            if (resolver == null)
            {
                throw new ArgumentNullException("resolver");
            }

            if (_initialized)
            {
                return;
            }

            Pool = resolver.Resolve<IMemoryPool>();
            MessageBus = resolver.Resolve<IMessageBus>();
            JsonSerializer = resolver.Resolve<JsonSerializer>();
            TraceManager = resolver.Resolve<ITraceManager>();
            Counters = resolver.Resolve<IPerformanceCounterManager>();
            AckHandler = resolver.Resolve<IAckHandler>();
            ProtectedData = resolver.Resolve<IProtectedData>();
            UserIdProvider = resolver.Resolve<IUserIdProvider>();

            _configurationManager = resolver.Resolve<IConfigurationManager>();
            _transportManager = resolver.Resolve<ITransportManager>();

            // Ensure that this server is listening for any ACKs sent over the bus.
            resolver.Resolve<AckSubscriber>();

            _initialized = true;
        }
开发者ID:Choulla-Naresh8264,项目名称:SignalR,代码行数:29,代码来源:PersistentConnection.cs

示例13: ConnectionString

        public ConnectionString(IConfigurationManager configuration, string name, string edmFilesPath,
            string ssdlFileName, string csdlFileName, string mslFileName)
        {
            if(String.IsNullOrEmpty(edmFilesPath))
            {
                edmFilesPath=_demFilesPath;
            }

            if(String.IsNullOrEmpty(ssdlFileName))
            {
                ssdlFileName=_ssdlFileName;
            }

            if(String.IsNullOrEmpty(csdlFileName))
            {
                csdlFileName=_csdlFileName;
            }
            if(String.IsNullOrEmpty(mslFileName))
            {
                mslFileName=_mslFileName;
            }

            string providerConnectionString=configuration.GetConnectionString(name);
            string providerName=configuration.GetProviderName(name);
            string metadata = String.Format(CultureInfo.InvariantCulture,
                _demMetadataFormat, edmFilesPath, csdlFileName, ssdlFileName, mslFileName);
            _entityBuilder = new EntityConnectionStringBuilder
            {
                ProviderConnectionString = providerConnectionString,
                Provider = providerName,
                Metadata = metadata
            };
        }
开发者ID:xxfss2,项目名称:Cat,代码行数:33,代码来源:ConnectionString.cs

示例14: CashFlowTypesViewModel

        public CashFlowTypesViewModel(IShellViewModel shell, IDatabase database, IConfigurationManager configuration, ICachedService cashedService, IEventAggregator eventAggregator)
            : base(shell, database, configuration, cashedService, eventAggregator)
        {
            SuppressEvent = false;
            _cashFlows = new BindableCollectionExt<CashFlow>();
            _cashFlows.PropertyChanged += (s, e) =>
            {
                OnPropertyChanged(s, e);
                CachedService.Clear(CachedServiceKeys.AllCashFlows);
            };

            _cashFlowGroups = new BindableCollectionExt<CashFlowGroup>();
            _cashFlowGroups.PropertyChanged += (s, e) =>
            {
                if (SuppressEvent == true)
                {
                    return;
                }
                OnPropertyChanged(s, e);

                CachedService.Clear(CachedServiceKeys.AllCashFlowGroups);
                CachedService.Clear(CachedServiceKeys.AllCashFlows);
                var cashFlowGroup = s as CashFlowGroup;
                _cashFlows.Where(x => x.CashFlowGroupId == cashFlowGroup.Id)
                    .ForEach(x => x.Group = cashFlowGroup);
                NewCashFlowGroup = null;
                NewCashFlowGroup = CashFlowGroups.First();
            };
        }
开发者ID:adalbertus,项目名称:BudgetPlanner,代码行数:29,代码来源:CashFlowTypesViewModel.cs

示例15: AssertManagerEquivalence

        /// <summary>
        /// Asserts equivalence between two IConfigurationManager.
        /// </summary>
        /// <param name="a"></param>
        /// <param name="b"></param>
        public static void AssertManagerEquivalence( IConfigurationManager a, IConfigurationManager b )
        {
            if( a == null && b == null ) return;

            Assert.That( a != null && b != null );

            Assert.That( a.Layers.Count == b.Layers.Count );

            for( int i = 0; i < a.Layers.Count; i++ )
            {
                // Consider equivalent if they're in the exact same order?
                var layerA = a.Layers[i];
                var layerB = b.Layers[i];

                Assert.That( layerA.LayerName == layerB.LayerName );

                foreach( var item in layerA.Items )
                {
                    Assert.That( layerB.Items.Any( x => x.ServiceOrPluginFullName == item.ServiceOrPluginFullName && x.Status == item.Status ) );
                }
            }

            if( a.FinalConfiguration != null )
            {
                Assert.That( b.FinalConfiguration != null );
                Assert.That( a.FinalConfiguration.Items.Count == b.FinalConfiguration.Items.Count );
                foreach( var item in a.FinalConfiguration.Items )
                {
                    Assert.That( b.FinalConfiguration.Items.Any( x => x.ServiceOrPluginFullName == item.ServiceOrPluginFullName && x.Status == item.Status ) );
                }
            }
        }
开发者ID:julien-moreau,项目名称:yodii,代码行数:37,代码来源:EquivalenceExtensions.cs


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