X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mcs%2Fclass%2FSystem.Web%2FSystem.Web%2FBrowserCapabilities.cs;h=c75f572a2e9455a29277ef4b2a770cbb81364e3a;hb=e5ce3fc558d8b465734642cb627a5a6103caeb44;hp=6e99494ec8ee09994a8fee0ad74bd48dbbf61f2f;hpb=9530c5256847039bb3af8aa7e5cb10d4ea5f5051;p=mono.git diff --git a/mcs/class/System.Web/System.Web/BrowserCapabilities.cs b/mcs/class/System.Web/System.Web/BrowserCapabilities.cs index 6e99494ec8e..c75f572a2e9 100644 --- a/mcs/class/System.Web/System.Web/BrowserCapabilities.cs +++ b/mcs/class/System.Web/System.Web/BrowserCapabilities.cs @@ -5,7 +5,7 @@ // Patrik Torstensson (Patrik.Torstensson@labs2.com) // Gonzalo Paniagua Javier (gonzalo@ximian.com) // -// (c) 2003 Novell, Inc. (http://www.novell.com) +// (c) 2003-2009 Novell, Inc. (http://www.novell.com) // // @@ -34,17 +34,11 @@ using System.Globalization; using System.Web.Configuration; using System.Web.UI; using System.Security.Permissions; +using System.Web.Util; -#if NET_2_0 -namespace System.Web.Configuration { +namespace System.Web.Configuration +{ public partial class HttpCapabilitiesBase -#else - -namespace System.Web { - [AspNetHostingPermission (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)] - [AspNetHostingPermission (SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)] - public class HttpBrowserCapabilities : HttpCapabilitiesBase -#endif { const int HaveActiveXControls = 1; // 1; const int HaveAdapters = 2; @@ -188,12 +182,6 @@ namespace System.Web { Version [] clrVersions; internal string useragent; -#if !NET_2_0 - public HttpBrowserCapabilities () - { - } -#endif - public bool ActiveXControls { get { if (!Get (HaveActiveXControls)) { @@ -250,7 +238,7 @@ namespace System.Web { return browser; } } -#if NET_2_0 + ArrayList browsers = null; public ArrayList Browsers { get { @@ -275,7 +263,7 @@ namespace System.Web { } return false; } -#endif + public bool CDF { get { if (!Get (HaveCDF)) { @@ -351,9 +339,8 @@ namespace System.Web { } } -#if NET_2_0 + [Obsolete] -#endif public bool JavaScript { get { if (!Get (HaveJavaScript)) { @@ -498,7 +485,6 @@ namespace System.Web { } } -#if NET_1_1 public Version [] GetClrVersions () { if (clrVersions == null) @@ -506,7 +492,6 @@ namespace System.Web { return clrVersions; } -#endif void InternalGetClrVersions () { @@ -536,11 +521,7 @@ namespace System.Web { if (list == null || list.Count == 0) { clrVersion = new Version (); -#if NET_2_0 clrVersions = null; -#else - clrVersions = new Version [1] { clrVersion }; -#endif } else { list.Sort (); clrVersions = (Version []) list.ToArray (typeof (Version)); @@ -554,7 +535,7 @@ namespace System.Web { throw CreateCapabilityNotFoundException (key); } - return (String.Compare (v, "True", true, CultureInfo.InvariantCulture) == 0); + return (String.Compare (v, "True", true, Helpers.InvariantCulture) == 0); } int ReadInt32 (string key) @@ -610,7 +591,6 @@ namespace System.Web { } } -#if NET_2_0 ArrayList ReadArrayList (string key) { ArrayList v = (ArrayList)this.capabilities [key]; @@ -620,7 +600,7 @@ namespace System.Web { return v; } -#endif + Exception CreateCapabilityNotFoundException (string key) { return new ArgumentNullException (String.Format ("browscaps.ini does not contain a definition for capability {0} for userAgent {1}", key, Browser)); }