+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
private XmlResolver xmlResolver;
#if NET_2_1
private DtdProcessing dtdProcessing;
- private Int64 maxCharactersFromEntities;
+ private long maxCharactersFromEntities;
+ private long maxCharactersInDocument;
#endif
public XmlReaderSettings ()
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 {
{
public class XmlUrlResolver : XmlResolver
{
-#if !NET_2_1
// Field
ICredentials credential;
-#endif
// Constructor
public XmlUrlResolver ()
{
}
-#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)
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