コード例 #1
0
 private static ConfigurationSettings GenerateConfigurationSettings()
 {
     ConfigurationSettings settings = new ConfigurationSettings();
     settings.ConfigurationSections.Add(new ConfigurationSectionData(LoggingSettings.SectionName, false, new XmlFileStorageProviderData("XmlStorage", "EnterpriseLibrary.Logging.config"), new XmlSerializerTransformerData("DataBuilder")));
     settings.ConfigurationSections.Add(new ConfigurationSectionData(DistributorSettings.SectionName, false, new XmlFileStorageProviderData("XmlStorage", "EnterpriseLibrary.LoggingDistributor.config"), new XmlSerializerTransformerData("DataBuilder")));
     return settings;
 }
コード例 #2
0
 private static ConfigurationSettings GenerateConfigurationSettings()
 {
     ConfigurationSettings settings = new ConfigurationSettings();
     XmlSerializerTransformerData transformer = new XmlSerializerTransformerData("Transformer");
     transformer.XmlIncludeTypes.Add( new XmlIncludeTypeData("AdRolesIncludeType", typeof(AdRolesProviderData).AssemblyQualifiedName));
     settings.ConfigurationSections.Add(new ConfigurationSectionData(SecuritySettings.SectionName, false, new XmlFileStorageProviderData("Storage", "EnterpriseLibrary.Security.config"), transformer));
     return settings;
 }
コード例 #3
0
        private static ConfigurationSettings GenerateConfigurationSettings()
        {
            ConfigurationSettings settings = new ConfigurationSettings();
            XmlSerializerTransformerData transformer = new XmlSerializerTransformerData("Transformer");
            transformer.XmlIncludeTypes.Add(new XmlIncludeTypeData("CachingStoreProviderData", typeof(CachingStoreProviderData).AssemblyQualifiedName));
            settings.ConfigurationSections.Add(new ConfigurationSectionData(SecuritySettings.SectionName, false, new XmlFileStorageProviderData("Storage", "EnterpriseLibrary.Security.config"), transformer));

            XmlSerializerTransformerData transformer2 = new XmlSerializerTransformerData("DataBuilder");
            transformer2.XmlIncludeTypes.Add(new XmlIncludeTypeData("Isolated Storage Configuration Data", typeof(IsolatedStorageCacheStorageData).AssemblyQualifiedName));
            settings.ConfigurationSections.Add( new ConfigurationSectionData(CacheManagerSettings.SectionName, false, new XmlFileStorageProviderData("XmlStorage", "EnterpriseLibrary.Caching.config"), transformer2	));
            return settings;
        }
コード例 #4
0
        /// <summary>
        /// <para>Gets the <see cref="KeyAlgorithmPairStorageProviderData"/> for the configuration.</para>
        /// </summary>
        /// <returns>
        /// <para>The <see cref="KeyAlgorithmPairStorageProviderData"/> for the configuration.</para>
        /// </returns>
        public virtual KeyAlgorithmPairStorageProviderData GetKeyAlgorithmPairStorageProviderData()
        {
            ConfigurationSettings settings = GetConfigurationSettings();

            return(settings.KeyAlgorithmPairStorageProviderData);
        }
コード例 #5
0
        /// <summary>
        /// <para>Initialize a new instance of the <see cref="ConfigurationManager"/> class with the preloaded configuration.</para>
        /// </summary>
        /// <param name="configurationSettings">
        /// <para>The preloaded configuration data to initialize the manager.</para>
        /// </param>
        public ConfigurationBuilder(ConfigurationSettings configurationSettings)
        {
            ArgumentValidation.CheckForNullReference(configurationSettings, "configurationSettings");

            InitializeConfiguration(configurationSettings);
        }
コード例 #6
0
        private void InitializeConfiguration(ConfigurationSettings configurationSettings)
        {
            this.configurationSettings = configurationSettings;

            InitializeBuilderCaches(null);
        }
コード例 #7
0
 private static ConfigurationSettings GenerateConfigurationSettings()
 {
     ConfigurationSettings settings = new ConfigurationSettings();
     settings.ConfigurationSections.Add(new ConfigurationSectionData(CryptographySettings.SectionName, false, new XmlFileStorageProviderData("Storage", "EnterpriseLibrary.Security.Cryptography.config"), new XmlSerializerTransformerData("Transformer")));
     return settings;
 }
コード例 #8
0
 /// <summary>
 /// <para>
 /// Write the meta configuration for the configuration manager to the configuration file.
 /// </para>
 /// </summary>
 /// <param name="configurationSettings">
 /// The meta configuration to write to configuration.
 /// </param>
 /// <exception cref="ConfigurationException">
 /// <para>An error occured while reading the configuration to save the data.</para>
 /// </exception>
 public void WriteMetaConfiguration(ConfigurationSettings configurationSettings)
 {
     disposableWrapper.ConfigurationBuilder.WriteMetaConfiguration(configurationSettings);
 }