2010-04-14 Atsushi Enomoto <atsushi@ximian.com>
authorAtsushi Eno <atsushieno@gmail.com>
Wed, 14 Apr 2010 06:19:11 +0000 (06:19 -0000)
committerAtsushi Eno <atsushieno@gmail.com>
Wed, 14 Apr 2010 06:19:11 +0000 (06:19 -0000)
* XamlObjectReader.cs
  XamlSchemaContext.cs
  XamlObjectReaderException.cs
  XamlXmlWriterException.cs
  XamlXmlWriterSettings.cs
  XamlObjectWriterException.cs
  XamlParseException.cs
  XamlInternalException.cs
  XamlException.cs
  XamlSchemaException.cs
  XamlDuplicateMemberException.cs : a handful of corcompare fixes.

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

12 files changed:
mcs/class/System.Xaml/System.Xaml/ChangeLog
mcs/class/System.Xaml/System.Xaml/XamlDuplicateMemberException.cs
mcs/class/System.Xaml/System.Xaml/XamlException.cs
mcs/class/System.Xaml/System.Xaml/XamlInternalException.cs
mcs/class/System.Xaml/System.Xaml/XamlObjectReader.cs
mcs/class/System.Xaml/System.Xaml/XamlObjectReaderException.cs
mcs/class/System.Xaml/System.Xaml/XamlObjectWriterException.cs
mcs/class/System.Xaml/System.Xaml/XamlParseException.cs
mcs/class/System.Xaml/System.Xaml/XamlSchemaContext.cs
mcs/class/System.Xaml/System.Xaml/XamlSchemaException.cs
mcs/class/System.Xaml/System.Xaml/XamlXmlWriterException.cs
mcs/class/System.Xaml/System.Xaml/XamlXmlWriterSettings.cs

index 607f14b5eaa02f1066cb682b7d713a76cbdca0f9..93515ecdcedc017aca0c55594dacd3d870c04319 100644 (file)
@@ -1,3 +1,18 @@
+2010-04-14  Atsushi Enomoto  <atsushi@ximian.com>
+
+       * XamlObjectReader.cs
+         XamlSchemaContext.cs
+         XamlObjectReaderException.cs
+         XamlXmlWriterException.cs
+         XamlXmlWriterSettings.cs
+         XamlObjectWriterException.cs
+         XamlParseException.cs
+         XamlInternalException.cs
+         XamlException.cs
+         XamlSchemaException.cs
+         XamlDuplicateMemberException.cs : a handful of corcompare fixes.
+
+
 2010-04-14  Atsushi Enomoto  <atsushi@ximian.com>
 
        * XamlMember.cs
index 8e531e63e1eef204eb5a664ec1e0e4e2f67a88c6..10e1858726177069929565e30c18bb6fd5664b0f 100644 (file)
@@ -30,6 +30,11 @@ namespace System.Xaml
        [Serializable]
        public class XamlDuplicateMemberException : XamlException
        {
+               public XamlDuplicateMemberException ()
+                       : this ("Duplicate members are found in the type")
+               {
+               }
+
                public XamlDuplicateMemberException (XamlMember member, XamlType type)
                        : this (String.Format ("duplicate member '{0}' in type '{1}'", member, type))
                {
index e351b112a79d5845c5ca213bf229e70e563ad8c8..216a6062d3f8980e5df23ba6bb8a9eb4e07b5e59 100644 (file)
@@ -30,6 +30,11 @@ namespace System.Xaml
        [Serializable]
        public class XamlException : Exception
        {
+               public XamlException ()
+                       : this ("XAML error")
+               {
+               }
+
                public XamlException (string message)
                        : this (message, null)
                {
index 024ecfe4bd23b7fe4a85e1b33870bbd2724108ab..d98aa4c4df23df17263f16ad387601ba1d9e1fbe 100644 (file)
@@ -30,6 +30,11 @@ namespace System.Xaml
        [Serializable]
        public class XamlInternalException : XamlException
        {
+               public XamlInternalException ()
+                       : this ("XAML internal error")
+               {
+               }
+
                public XamlInternalException (string message)
                        : this (message, null)
                {
index 09f597f4d3b4014e5d43f00466c881afa9ee8a14..bcc3f5444ef194fa3414fa95a0ee08a3541e788a 100644 (file)
@@ -121,7 +121,11 @@ namespace System.Xaml
                Stack<IEnumerator<XamlMember>> members_stack = new Stack<IEnumerator<XamlMember>> ();
                IEnumerator<NamespaceDeclaration> namespaces;
                XamlNodeType node_type = XamlNodeType.None;
-               bool is_eof, is_disposed;
+               bool is_eof;
+
+               public object Instance {
+                       get { return instance; }
+               }
 
                public override bool IsEof {
                        get { return is_eof; }
@@ -150,15 +154,10 @@ namespace System.Xaml
                public override object Value {
                        get { return NodeType == XamlNodeType.Value ? objects.Peek () : null; }
                }
-
-               protected override void Dispose (bool disposing)
-               {
-                       is_disposed = true;
-               }
                
                public override bool Read ()
                {
-                       if (is_disposed)
+                       if (IsDisposed)
                                throw new ObjectDisposedException ("reader");
                        if (IsEof)
                                return false;
index 5a1e4407db4b305d3cd2fe64aff1fc11d6f807f2..0bad880d68deecb2e0b1f408568315ae16db8888 100644 (file)
@@ -30,6 +30,11 @@ namespace System.Xaml
        [Serializable]
        public class XamlObjectReaderException : XamlException
        {
+               public XamlObjectReaderException ()
+                       : this ("XAML object reader error")
+               {
+               }
+
                public XamlObjectReaderException (string message)
                        : this (message, null)
                {
index 08d6b50c872b537d64d5ac7e8b341ddcc2bb8f18..17708cc03444f98232f6030c33a39ff923c49a9c 100644 (file)
@@ -30,6 +30,11 @@ namespace System.Xaml
        [Serializable]
        public class XamlObjectWriterException : XamlException
        {
+               public XamlObjectWriterException ()
+                       : this ("XAML object writer error")
+               {
+               }
+
                public XamlObjectWriterException (string message)
                        : this (message, null)
                {
index aad6340f1f52fadfe772c6630cf30a4d9c47a90f..4bb8340a48a274fcdc9e3e5c153e05cc5c6af772 100644 (file)
@@ -30,6 +30,11 @@ namespace System.Xaml
        [Serializable]
        public class XamlParseException : XamlException
        {
+               public XamlParseException ()
+                       : this ("XAML parse error")
+               {
+               }
+
                public XamlParseException (string message)
                        : this (message, null)
                {
index 999e7e1a39cff51c9b62920db1c3c16b0a2c261e..632a9744c5dc9492c38c6f57db4c9c40e80aaf34 100644 (file)
@@ -36,6 +36,11 @@ namespace System.Xaml
        // It should be released at finalizer.
        public class XamlSchemaContext
        {
+               public XamlSchemaContext ()
+                       : this (null, null)
+               {
+               }
+
                public XamlSchemaContext (IEnumerable<Assembly> referenceAssemblies)
                        : this (referenceAssemblies, null)
                {
index e3fb71a907a4d04357035bb1fa43e5e2f24605a2..78de4f8e4822f8b855c84365dc49d9f224f23bfc 100644 (file)
@@ -30,6 +30,11 @@ namespace System.Xaml
        [Serializable]
        public class XamlSchemaException : XamlException
        {
+               public XamlSchemaException ()
+                       : this ("XAML schema error")
+               {
+               }
+
                public XamlSchemaException (string message)
                        : this (message, null)
                {
index ab7301603f70d7bdc853c6cd27726c086954d717..ffa402cc7dfc3d6a2bf0d8c2284a7d1a21203be4 100644 (file)
@@ -30,6 +30,11 @@ namespace System.Xaml
        [Serializable]
        public class XamlXmlWriterException : XamlException
        {
+               public XamlXmlWriterException ()
+                       : this ("XAML writer error")
+               {
+               }
+
                public XamlXmlWriterException (string message)
                        : this (message, null)
                {
index be8aa7ebadadf34667500e245437b9b4240e7c3b..4940f5feb2a84d4692048cdbc1d747e2908be466 100644 (file)
@@ -31,7 +31,23 @@ namespace System.Xaml
 {
        public class XamlXmlWriterSettings : XamlWriterSettings
        {
+               public XamlXmlWriterSettings ()
+               {
+               }
+
+               XamlXmlWriterSettings (XamlXmlWriterSettings other)
+                       : base (other)
+               {
+                       AssumeValidInput = other.AssumeValidInput;
+                       CloseOutput = other.CloseOutput;
+               }
+
                public bool AssumeValidInput { get; set; }
                public bool CloseOutput { get; set; }
+
+               public XamlXmlWriterSettings Copy ()
+               {
+                       return new XamlXmlWriterSettings (this);
+               }
        }
 }