2009-04-28 Sebastien Pouliot <sebastien@ximian.com>
authorSebastien Pouliot <sebastien@ximian.com>
Tue, 28 Apr 2009 15:49:07 +0000 (15:49 -0000)
committerSebastien Pouliot <sebastien@ximian.com>
Tue, 28 Apr 2009 15:49:07 +0000 (15:49 -0000)
* XmlReaderSettings.cs: Add MaxCharactersInDocument property for
NET_2_1 profile
* XmlUrlResolver.cs: Cleanup #ifdef NET_2_1 inside this file
since this is not used anymore in Moonlight

svn path=/trunk/mcs/; revision=132855

mcs/class/System.XML/System.Xml/ChangeLog
mcs/class/System.XML/System.Xml/XmlReaderSettings.cs
mcs/class/System.XML/System.Xml/XmlUrlResolver.cs

index b0d1ae03b86b0eaf6fd2f8694529f59b049b22d8..6b29611ba50ae394563abeabbfe36b50dcf0463f 100644 (file)
@@ -1,3 +1,10 @@
+2009-04-28  Sebastien Pouliot  <sebastien@ximian.com>
+
+       * XmlReaderSettings.cs: Add MaxCharactersInDocument property for 
+       NET_2_1 profile
+       * XmlUrlResolver.cs: Cleanup #ifdef NET_2_1 inside this file 
+       since this is not used anymore in Moonlight
+
 2009-04-28  Sebastien Pouliot  <sebastien@ximian.com> 
 
        * XmlXapResolver.cs: Remove dependency on XmlUrlResolver. Small 
index 98009c5712588b846cab71766ad06824bf87c77c..464de0bfc86a6c6a611bd1a49072bd3aaf3c1596 100644 (file)
@@ -62,7 +62,8 @@ namespace System.Xml
                private XmlResolver xmlResolver;
 #if NET_2_1
                private DtdProcessing dtdProcessing;
-               private Int64 maxCharactersFromEntities;
+               private long maxCharactersFromEntities;
+               private long maxCharactersInDocument;
 #endif
 
                public XmlReaderSettings ()
@@ -123,10 +124,16 @@ namespace System.Xml
                        set { dtdProcessing = value; }
                }
 
-               public Int64 MaxCharactersFromEntities {
+               public long MaxCharactersFromEntities {
                        get { return maxCharactersFromEntities; }
                        set { maxCharactersFromEntities = value; }
                }
+
+               [MonoTODO ("not used yet")]
+               public long MaxCharactersInDocument {
+                       get { return maxCharactersInDocument; }
+                       set { maxCharactersInDocument = value; }
+               }
 #endif
 
                public bool IgnoreComments {
index 255496aac27173e1c7292634aec6c8a2caca749c..9745f5b6f69b4c1e891d4ad2ca494cc3e3fe15b7 100644 (file)
@@ -35,10 +35,8 @@ namespace System.Xml
 {
        public class XmlUrlResolver : XmlResolver
        {
-#if !NET_2_1
                // Field
                ICredentials credential;
-#endif
 
                // Constructor
                public XmlUrlResolver ()
@@ -46,18 +44,13 @@ namespace System.Xml
                {
                }
 
-#if !NET_2_1
                // Properties           
                public override ICredentials Credentials
                {
                        set { credential = value; }
                }
-#endif
 
                // Methods
-#if NET_2_1
-               [MonoTODO ("What should/can we do for non-file URLs, without HttpWebRequest implementation in System.dll?")]
-#endif
                public override object GetEntity (Uri absoluteUri, string role, Type ofObjectToReturn)
                {
                        if (ofObjectToReturn == null)
@@ -76,16 +69,11 @@ namespace System.Xml
                                return new FileStream (UnescapeRelativeUriBody (absoluteUri.LocalPath), FileMode.Open, FileAccess.Read, FileShare.Read);
                        }
 
-#if NET_2_1
-                       // So, what can I do here? HttpWebRequest cannot be instantiated within System.dll
-                       throw new NotImplementedException ();
-#else
                        // (MS documentation says) parameter role isn't used yet.
                        WebRequest req = WebRequest.Create (absoluteUri);
                        if (credential != null)
                                req.Credentials = credential;
                        return req.GetResponse().GetResponseStream();
-#endif
                }
 
 #if NET_2_0