protected override void Initialize() { CacheManagerSettings settings = (CacheManagerSettings)ConfigurationSource.GetSection(CacheManagerSettings.SectionName); if (settings == null) { return; } CreateProvidersPolicies <IBackingStore, CacheStorageData>( Context.Policies, null, settings.BackingStores, ConfigurationSource); CreateProvidersPolicies <IStorageEncryptionProvider, StorageEncryptionProviderData>( Context.Policies, null, settings.EncryptionProviders, ConfigurationSource); CreateProvidersPolicies <ICacheManager, CacheManagerDataBase>( Context.Policies, settings.DefaultCacheManager, settings.CacheManagers, ConfigurationSource); CreateCacheManagerLifetimePolicies( Context.Policies, Context.Container, settings.CacheManagers); }
protected override void Initialize() { TestSettings settings = (TestSettings)ConfigurationSource.GetSection(settingsKey); CreateProvidersPolicies <TestClass, TestSettingBase>( Context.Policies, null, settings.Settings, ConfigurationSource); }
protected override void Initialize() { ExceptionHandlingSettings settings = (ExceptionHandlingSettings)ConfigurationSource.GetSection(ExceptionHandlingSettings.SectionName); if (settings == null) { return; } CreateExceptionPoliciesPolicies(Context.Policies, settings.ExceptionPolicies); CreateExceptionManagerPolicy(Context.Policies, settings); Container.RegisterType <ExceptionManager, ExceptionManagerImpl>(); }
public void ThenThrowsConfigurationErrorsException() { ConfigurationSource.GetSection("duplicateName"); }
public override ConfigurationSection GetConfiguration() { return(ConfigurationSource.GetSection(SectionNames.Unity)); }