* SqlDecimal.cs: Changed argument names to match MS. Code formatting.
[mono.git] / mcs / class / System.Data / System.Data.SqlTypes / SqlXml.cs
1 //
2 // System.Data.SqlTypes.SqlXml
3 //
4 // Author:
5 //      Umadevi S (sumadevi@novell.com)
6 //
7 // Copyright (C) 2004 Novell, Inc (http://www.novell.com)
8 //
9 // Permission is hereby granted, free of charge, to any person obtaining
10 // a copy of this software and associated documentation files (the
11 // "Software"), to deal in the Software without restriction, including
12 // without limitation the rights to use, copy, modify, merge, publish,
13 // distribute, sublicense, and/or sell copies of the Software, and to
14 // permit persons to whom the Software is furnished to do so, subject to
15 // the following conditions:
16 // 
17 // The above copyright notice and this permission notice shall be
18 // included in all copies or substantial portions of the Software.
19 // 
20 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
22 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
23 // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
24 // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
25 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
26 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
27 //
28
29 using System;
30 using System.IO;
31 using System.Xml;
32 using System.Xml.Schema;
33 using System.Globalization;
34 using System.Threading;
35 using System.Xml.Serialization;
36
37 #if NET_2_0
38
39 namespace System.Data.SqlTypes
40 {
41         [SerializableAttribute]
42         [XmlSchemaProvider ("GetXsdType")]
43         public sealed class SqlXml : INullable, IXmlSerializable
44         {
45                 bool notNull;
46
47                 [MonoTODO]
48                 public SqlXml ()
49                 {
50                         notNull = false;
51                 }
52
53                 [MonoTODO]
54                 public SqlXml (Stream value)
55                 {
56                         if (value == null) {
57                                 notNull = false;
58                         } else {
59                                 notNull = true;
60                         }
61                 }
62
63                 [MonoTODO]
64                 public SqlXml (XmlReader value)
65                 {
66                         if (value == null) {
67                                 notNull = false;
68                         } else {
69                                 notNull = true;
70                         }
71                 }
72
73                 public bool IsNull {
74                         get { return !notNull; }
75                 }
76
77                 public static SqlXml Null {
78                         get {
79                                 return new SqlXml ();
80                         }
81                 }
82
83                 public static XmlQualifiedName GetXsdType (XmlSchemaSet schemaSet)
84                 {
85                         XmlQualifiedName qualifiedName = new XmlQualifiedName ("anyType", "http://www.w3.org/2001/XMLSchema");
86                         return qualifiedName;
87                 }
88
89                 [MonoNotSupported("")]
90                 public XmlReader CreateReader ()
91                 {
92                         throw new NotImplementedException ();
93                 }
94
95                 [MonoTODO]
96                 XmlSchema IXmlSerializable.GetSchema ()
97                 {
98                         throw new NotImplementedException ();
99                 }
100                 
101                 [MonoTODO]
102                 void IXmlSerializable.ReadXml (XmlReader r)
103                 {
104                         throw new NotImplementedException ();
105                 }
106                 
107                 [MonoTODO]
108                 void IXmlSerializable.WriteXml (XmlWriter writer) 
109                 {
110                         throw new NotImplementedException ();
111                 }
112         }
113 }
114
115 #endif