Author: atsushi
Date: 2007-03-14 00:56:52 -0500 (Wed, 14 Mar 2007)
New Revision: 74231
Modified:
trunk/olive/class/System.Runtime.Serialization/System.Xml/ChangeLog
trunk/olive/class/System.Runtime.Serialization/System.Xml/UniqueId.cs
trunk/olive/class/System.Runtime.Serialization/System.Xml/XmlDictionaryReaderQuotas.cs
trunk/olive/class/System.Runtime.Serialization/System.Xml/XmlDictionaryWriter.cs
trunk/olive/class/System.Runtime.Serialization/System.Xml/XmlSimpleDictionaryWriter.cs
Log:
2007-03-14 Atsushi Enomoto <[EMAIL PROTECTED]>
* UniqueId.cs : hacky Equals() implementation.
* XmlDictionaryReaderQuotas.cs : removed Default and fixed Max.
* XmlSimpleDictionaryWriter.cs : in .NET 3.0 RTM, it is supported.
* XmlDictionaryWriter.cs : WriteStartElement(XmlDictionaryString,
XmlDictionaryString) should call WriteStartElement(string,
XmlDictionaryString,XmlDictionaryString) since because only the
latter is overridable and possible to provide dictionary string.
Modified: trunk/olive/class/System.Runtime.Serialization/System.Xml/ChangeLog
===================================================================
--- trunk/olive/class/System.Runtime.Serialization/System.Xml/ChangeLog
2007-03-14 04:59:12 UTC (rev 74230)
+++ trunk/olive/class/System.Runtime.Serialization/System.Xml/ChangeLog
2007-03-14 05:56:52 UTC (rev 74231)
@@ -1,3 +1,13 @@
+2007-03-14 Atsushi Enomoto <[EMAIL PROTECTED]>
+
+ * UniqueId.cs : hacky Equals() implementation.
+ * XmlDictionaryReaderQuotas.cs : removed Default and fixed Max.
+ * XmlSimpleDictionaryWriter.cs : in .NET 3.0 RTM, it is supported.
+ * XmlDictionaryWriter.cs : WriteStartElement(XmlDictionaryString,
+ XmlDictionaryString) should call WriteStartElement(string,
+ XmlDictionaryString,XmlDictionaryString) since because only the
+ latter is overridable and possible to provide dictionary string.
+
2007-03-09 Atsushi Enomoto <[EMAIL PROTECTED]>
* XmlDictionaryReader.cs : make it partial. Fill Quotas when requested.
Modified: trunk/olive/class/System.Runtime.Serialization/System.Xml/UniqueId.cs
===================================================================
--- trunk/olive/class/System.Runtime.Serialization/System.Xml/UniqueId.cs
2007-03-14 04:59:12 UTC (rev 74230)
+++ trunk/olive/class/System.Runtime.Serialization/System.Xml/UniqueId.cs
2007-03-14 05:56:52 UTC (rev 74231)
@@ -4,7 +4,7 @@
// Author:
// Atsushi Enomoto <[EMAIL PROTECTED]>
//
-// Copyright (C) 2005 Novell, Inc. http://www.novell.com
+// Copyright (C) 2005,2007 Novell, Inc. http://www.novell.com
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -105,7 +105,7 @@
return g1.Equals (g2);
}
- throw new NotImplementedException ();
+ return ToString () == other.ToString ();
}
[MonoTODO]
Modified:
trunk/olive/class/System.Runtime.Serialization/System.Xml/XmlDictionaryReaderQuotas.cs
===================================================================
---
trunk/olive/class/System.Runtime.Serialization/System.Xml/XmlDictionaryReaderQuotas.cs
2007-03-14 04:59:12 UTC (rev 74230)
+++
trunk/olive/class/System.Runtime.Serialization/System.Xml/XmlDictionaryReaderQuotas.cs
2007-03-14 05:56:52 UTC (rev 74231)
@@ -30,11 +30,10 @@
{
public sealed class XmlDictionaryReaderQuotas
{
- static XmlDictionaryReaderQuotas std, max;
+ static XmlDictionaryReaderQuotas max;
static XmlDictionaryReaderQuotas ()
{
- std = new XmlDictionaryReaderQuotas (true);
max = new XmlDictionaryReaderQuotas (true);
}
@@ -46,30 +45,16 @@
{
}
- private XmlDictionaryReaderQuotas (bool isReadOnly)
+ private XmlDictionaryReaderQuotas (bool max)
{
- is_readonly = isReadOnly;
- array_len = DefaultMaxArrayLength;
- bytes = DefaultMaxBytesPerRead;
- depth = DefaultMaxDepth;
- nt_chars = DefaultMaxNameTableCharCount;
- text_len = DefaultMaxStringContentLength;
+ is_readonly = max;
+ array_len = max ? int.MaxValue : 0x4000;
+ bytes = max ? int.MaxValue : 0x1000;
+ depth = max ? int.MaxValue : 0x20;
+ nt_chars = max ? int.MaxValue : 0x4000;
+ text_len = max ? int.MaxValue : 0x2000;
}
- internal const int DefaultMaxArrayLength = int.MaxValue;
-
- internal const int DefaultMaxBytesPerRead = int.MaxValue;
-
- internal const int DefaultMaxDepth = int.MaxValue;
-
- internal const int DefaultMaxNameTableCharCount = int.MaxValue;
-
- internal const int DefaultMaxStringContentLength = int.MaxValue;
-
- internal static XmlDictionaryReaderQuotas Default {
- get { return std; }
- }
-
public static XmlDictionaryReaderQuotas Max {
get { return max; }
}
Modified:
trunk/olive/class/System.Runtime.Serialization/System.Xml/XmlDictionaryWriter.cs
===================================================================
---
trunk/olive/class/System.Runtime.Serialization/System.Xml/XmlDictionaryWriter.cs
2007-03-14 04:59:12 UTC (rev 74230)
+++
trunk/olive/class/System.Runtime.Serialization/System.Xml/XmlDictionaryWriter.cs
2007-03-14 05:56:52 UTC (rev 74231)
@@ -207,7 +207,7 @@
XmlDictionaryString localName,
XmlDictionaryString namespaceUri)
{
- WriteStartElement (localName.Value, namespaceUri.Value);
+ WriteStartElement (null, localName, namespaceUri);
}
public virtual void WriteStartElement (string prefix,
Modified:
trunk/olive/class/System.Runtime.Serialization/System.Xml/XmlSimpleDictionaryWriter.cs
===================================================================
---
trunk/olive/class/System.Runtime.Serialization/System.Xml/XmlSimpleDictionaryWriter.cs
2007-03-14 04:59:12 UTC (rev 74230)
+++
trunk/olive/class/System.Runtime.Serialization/System.Xml/XmlSimpleDictionaryWriter.cs
2007-03-14 05:56:52 UTC (rev 74231)
@@ -134,10 +134,7 @@
public override void WriteProcessingInstruction (string name,
string text)
{
- if (name != "xml")
- throw new InvalidOperationException
("Processing instructions are not supported. ('xml' is allowed for
XmlDeclaration; this is because of design problem of ECMA XmlWriter)");
- // Otherwise, silently ignored. WriteStartDocument()
- // is still callable after this method(!)
+ writer.WriteProcessingInstruction (name, text);
}
public override void WriteQualifiedName (string localName,
string ns)
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches