| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124 |
- /* header comment goes here */
- using System;
- using System.Configuration;
- using System.Text;
- using System.Xml;
- #if NET_2_0
- namespace System.Web.Configuration {
- public sealed class GlobalizationSection : ConfigurationSection
- {
- static ConfigurationProperty cultureProp;
- static ConfigurationProperty enableBestFitResponseEncodingProp;
- static ConfigurationProperty enableClientBasedCultureProp;
- static ConfigurationProperty fileEncodingProp;
- static ConfigurationProperty requestEncodingProp;
- static ConfigurationProperty resourceProviderFactoryTypeProp;
- static ConfigurationProperty responseEncodingProp;
- static ConfigurationProperty responseHeaderEncodingProp;
- static ConfigurationProperty uiCultureProp;
- static ConfigurationPropertyCollection properties;
- static GlobalizationSection ()
- {
- cultureProp = new ConfigurationProperty ("culture", typeof (string), "");
- enableBestFitResponseEncodingProp = new ConfigurationProperty ("enableBestFitResponseEncoding", typeof (bool), false);
- enableClientBasedCultureProp = new ConfigurationProperty ("enableClientBasedCulture", typeof (bool), false);
- fileEncodingProp = new ConfigurationProperty ("fileEncoding", typeof (Encoding));
- requestEncodingProp = new ConfigurationProperty ("requestEncoding", typeof (Encoding), Encoding.UTF8);
- resourceProviderFactoryTypeProp = new ConfigurationProperty ("resourceProviderFactoryType", typeof (string), "");
- responseEncodingProp = new ConfigurationProperty ("responseEncoding", typeof (Encoding), Encoding.UTF8);
- responseHeaderEncodingProp = new ConfigurationProperty ("responseHeaderEncoding", typeof (Encoding), Encoding.UTF8);
- uiCultureProp = new ConfigurationProperty ("uiCulture", typeof (string), "");
- properties = new ConfigurationPropertyCollection ();
- properties.Add (cultureProp);
- properties.Add (enableBestFitResponseEncodingProp);
- properties.Add (enableClientBasedCultureProp);
- properties.Add (fileEncodingProp);
- properties.Add (requestEncodingProp);
- properties.Add (resourceProviderFactoryTypeProp);
- properties.Add (responseEncodingProp);
- properties.Add (responseHeaderEncodingProp);
- properties.Add (uiCultureProp);
- }
- [MonoTODO]
- protected override void PostDeserialize ()
- {
- base.PostDeserialize();
- }
- [MonoTODO]
- protected override void PreSerialize (XmlWriter writer)
- {
- base.PostDeserialize();
- }
- [ConfigurationProperty ("culture", DefaultValue = "")]
- public string Culture {
- get { return (string) base [cultureProp];}
- set { base[cultureProp] = value; }
- }
- [ConfigurationProperty ("enableBestFitResponseEncoding", DefaultValue = "False")]
- public bool EnableBestFitResponseEncoding {
- get { return (bool) base [enableBestFitResponseEncodingProp];}
- set { base[enableBestFitResponseEncodingProp] = value; }
- }
- [ConfigurationProperty ("enableClientBasedCulture", DefaultValue = "False")]
- public bool EnableClientBasedCulture {
- get { return (bool) base [enableClientBasedCultureProp];}
- set { base[enableClientBasedCultureProp] = value; }
- }
- [ConfigurationProperty ("fileEncoding")]
- public Encoding FileEncoding {
- get { return (Encoding) base [fileEncodingProp];}
- set { base[fileEncodingProp] = value; }
- }
- [ConfigurationProperty ("requestEncoding", DefaultValue = "utf-8")]
- public Encoding RequestEncoding {
- get { return (Encoding) base [requestEncodingProp];}
- set { base[requestEncodingProp] = value; }
- }
- [ConfigurationProperty ("resourceProviderFactoryType", DefaultValue = "")]
- public string ResourceProviderFactoryType {
- get { return (string) base [resourceProviderFactoryTypeProp];}
- set { base[resourceProviderFactoryTypeProp] = value; }
- }
- [ConfigurationProperty ("responseEncoding", DefaultValue = "utf-8")]
- public Encoding ResponseEncoding {
- get { return (Encoding) base [responseEncodingProp];}
- set { base[responseEncodingProp] = value; }
- }
- [ConfigurationProperty ("responseHeaderEncoding", DefaultValue = "utf-8")]
- public Encoding ResponseHeaderEncoding {
- get { return (Encoding) base [responseHeaderEncodingProp];}
- set { base[responseHeaderEncodingProp] = value; }
- }
- [ConfigurationProperty ("uiCulture", DefaultValue = "")]
- public string UICulture {
- get { return (string) base [uiCultureProp];}
- set { base[uiCultureProp] = value; }
- }
- protected override ConfigurationPropertyCollection Properties {
- get { return properties; }
- }
- }
- }
- #endif
|