Пример #1
0
        private XmlSerializerTransformerData GetXmlSerializerTransformerData(string sectionName)
        {
            TransformerData transformerData = GetTransformerProviderData(sectionName);

            ArgumentValidation.CheckExpectedType(transformerData, typeof(XmlSerializerTransformerData));
            return((XmlSerializerTransformerData)transformerData);
        }
Пример #2
0
 /// <summary>
 /// <para>Initializes a new instance of the <see cref="ConfigurationSectionData"/> class with a name, a cache, a storage provider, a data protection provider and a data transformer.</para>
 /// </summary>
 /// <param name="name">
 /// <para>The name of the section.</para>
 /// </param>
 /// <param name="encrypt">
 /// <para>Determines if the section is encrypted or not.</para>
 /// </param>
 /// <param name="storageProvider">
 /// <para>The <see cref="StorageProviderData"/> used for the configuration section.</para>
 /// </param>
 /// <param name="transformer">
 /// <para>The <see cref="TransformerData"/> used for the section.</para>
 /// </param>
 /// <seealso cref="StorageProviderData"/>
 /// <seealso cref="TransformerData"/>
 public ConfigurationSectionData(string name, bool encrypt, StorageProviderData storageProvider, TransformerData transformer)
 {
     this.name            = name;
     this.encrypt         = encrypt;
     this.storageProvider = storageProvider;
     this.transformer     = transformer;
 }
Пример #3
0
        protected override Type GetConfigurationType(string sectionName)
        {
            TransformerData transformerData = GetTransformerData(sectionName);

            if (null != transformerData)
            {
                string typeName = transformerData.TypeName;
                return(GetType(typeName));
            }
            return(typeof(NullTransformer));
        }
Пример #4
0
        protected override void InitializeConfigurationProvider(string sectionName, IConfigurationProvider provider)
        {
            TransformerData transformerData = GetTransformerData(sectionName);

            // since we could be using a NullTransformer
            if (transformerData != null)
            {
                provider.ConfigurationName = transformerData.Name;
            }
            ((ITransformer)provider).CurrentSectionName = sectionName;
            base.InitializeConfigurationProvider(sectionName, provider);
        }
 /// <summary>
 /// <para>Initializes a new instance of the <see cref="ConfigurationSectionData"/> class with a name, a cache, a storage provider, a data protection provider and a data transformer.</para>
 /// </summary>
 /// <param name="name">
 /// <para>The name of the section.</para>
 /// </param>
 /// <param name="encrypt">
 /// <para>Determines if the section is encrypted or not.</para>
 /// </param>
 /// <param name="storageProvider">
 /// <para>The <see cref="StorageProviderData"/> used for the configuration section.</para>
 /// </param>        
 /// <param name="transformer">
 /// <para>The <see cref="TransformerData"/> used for the section.</para>
 /// </param>                
 /// <seealso cref="StorageProviderData"/>        
 /// <seealso cref="TransformerData"/>
 public ReadOnlyConfigurationSectionData(string name, bool encrypt, StorageProviderData storageProvider, TransformerData transformer)
     : base(name, encrypt, storageProvider, transformer)
 {
 }
 /// <summary>
 /// <para>Initializes a new instance of the <see cref="ConfigurationSectionData"/> class with a name, a cache, a storage provider, a data protection provider and a data transformer.</para>
 /// </summary>
 /// <param name="name">
 /// <para>The name of the section.</para>
 /// </param>
 /// <param name="encrypt">
 /// <para>Determines if the section is encrypted or not.</para>
 /// </param>
 /// <param name="storageProvider">
 /// <para>The <see cref="StorageProviderData"/> used for the configuration section.</para>
 /// </param>
 /// <param name="transformer">
 /// <para>The <see cref="TransformerData"/> used for the section.</para>
 /// </param>
 /// <seealso cref="StorageProviderData"/>
 /// <seealso cref="TransformerData"/>
 public ReadOnlyConfigurationSectionData(string name, bool encrypt, StorageProviderData storageProvider, TransformerData transformer) : base(name, encrypt, storageProvider, transformer)
 {
 }
Пример #7
0
 /// <summary>
 /// <para>Initializes a new instance of the <see cref="ConfigurationSectionData"/> class with a name, a cache, a storage provider, a data protection provider and a data transformer.</para>
 /// </summary>
 /// <param name="name">
 /// <para>The name of the section.</para>
 /// </param>
 /// <param name="encrypt">
 /// <para>Determines if the section is encrypted or not.</para>
 /// </param>
 /// <param name="storageProvider">
 /// <para>The <see cref="StorageProviderData"/> used for the configuration section.</para>
 /// </param>        
 /// <param name="transformer">
 /// <para>The <see cref="TransformerData"/> used for the section.</para>
 /// </param>                
 /// <seealso cref="StorageProviderData"/>        
 /// <seealso cref="TransformerData"/>
 public ConfigurationSectionData(string name, bool encrypt, StorageProviderData storageProvider, TransformerData transformer)
 {
     this.name = name;
     this.encrypt = encrypt;
     this.storageProvider = storageProvider;
     this.transformer = transformer;
 }