| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- //
- // System.Web.Configuration.GlobalizationConfiguration
- //
- // Authors:
- // Patrik Torstensson ([email protected])
- // Gonzalo Paniagua Javier ([email protected])
- //
- // (c) 2003 Ximian, Inc. (http://www.ximian.com)
- //
- using System.Globalization;
- using System.Text;
- namespace System.Web.Configuration
- {
- class GlobalizationConfiguration
- {
- internal Encoding RequestEncoding;
- internal Encoding ResponseEncoding;
- internal Encoding FileEncoding;
- internal CultureInfo Culture;
- internal CultureInfo UICulture;
- internal GlobalizationConfiguration (object p)
- {
- if (!(p is GlobalizationConfiguration))
- return;
- GlobalizationConfiguration parent = (GlobalizationConfiguration) p;
- RequestEncoding = parent.RequestEncoding;
- ResponseEncoding = parent.ResponseEncoding;
- FileEncoding = parent.FileEncoding;
- Culture = parent.Culture;
- UICulture = parent.UICulture;
- }
- static public GlobalizationConfiguration GetInstance (HttpContext context)
- {
- GlobalizationConfiguration config;
- if (context == null)
- context = HttpContext.Context;
- //config = context.GetConfig ("system.web/globalization") as GlobalizationConfiguration;
- try {
- config = HttpContext.GetAppConfig ("system.web/globalization")
- as GlobalizationConfiguration;
- } catch {
- return null;
- }
- return config;
- }
- }
- }
|