[system.data] SqlXml from reference sources
authorMarek Safar <marek.safar@gmail.com>
Thu, 14 May 2015 15:35:58 +0000 (17:35 +0200)
committerMarek Safar <marek.safar@gmail.com>
Thu, 14 May 2015 17:09:28 +0000 (19:09 +0200)
mcs/class/System.Data/Makefile
mcs/class/System.Data/System.Data.SqlTypes/SqlXml.cs [deleted file]
mcs/class/System.Data/mobile_System.Data.dll.sources
mcs/class/System.Data/mobile_referencesource.sources
mcs/class/System.Data/net_4_5_System.Data.dll.sources
mcs/class/System.Data/referencesource.sources

index 1738b756aade896853fc37a77d5b7824f3ab8a93..54755698efd8eb752a60d9351957a3ea65a4874c 100644 (file)
@@ -6,7 +6,7 @@ LIBRARY = System.Data.dll
 
 LIB_REFS = System System.Xml System.Core System.Numerics
 LIB_MCS_FLAGS = \
-       -nowarn:649 \
+       -nowarn:219,414,649 \
        -d:PLATFORM_UNIX \
        -d:USEOFFSET \
        -d:MONO_PARTIAL_DATA_IMPORT \
@@ -15,7 +15,7 @@ LIB_MCS_FLAGS = \
 MOBILE := $(filter monotouch monodroid xammac mobile mobile_static, $(PROFILE))
 ifdef MOBILE
 LIB_REFS += Mono.Data.Tds System.Transactions
-LIB_MCS_FLAGS += -d:NO_CODEDOM -d:NO_OLEDB -d:NO_ODBC -d:NO_CONFIGURATION -nowarn:618
+LIB_MCS_FLAGS += -d:NO_CODEDOM -d:NO_OLEDB -d:NO_ODBC -d:NO_CONFIGURATION
 else
 LIB_REFS += System.EnterpriseServices Mono.Data.Tds System.Configuration System.Transactions
 BUILT_SOURCES = \
diff --git a/mcs/class/System.Data/System.Data.SqlTypes/SqlXml.cs b/mcs/class/System.Data/System.Data.SqlTypes/SqlXml.cs
deleted file mode 100644 (file)
index e20d919..0000000
+++ /dev/null
@@ -1,161 +0,0 @@
-//
-// System.Data.SqlTypes.SqlXml
-//
-// Author:
-//     Umadevi S (sumadevi@novell.com)
-//     Veerapuram Varadhan  (vvaradhan@novell.com>)
-//
-// Copyright (C) 2004 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
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-// 
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-// 
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-using System;
-using System.IO;
-using System.Xml;
-using System.Xml.Schema;
-using System.Globalization;
-using System.Threading;
-using System.Xml.Serialization;
-using System.Text;
-
-
-namespace System.Data.SqlTypes
-{
-       [SerializableAttribute]
-       [XmlSchemaProvider ("GetXsdType")]
-       public sealed class SqlXml : INullable, IXmlSerializable
-       {
-               bool notNull;
-               string xmlValue;
-               
-               public SqlXml ()
-               {
-                       notNull = false;
-                       xmlValue = null;
-               }
-
-               public SqlXml (Stream value)
-               {
-                       if (value == null) {
-                               notNull = false;
-                               xmlValue = null;
-                       } else {
-                               int len = (int) value.Length;
-                               
-                               if (len < 1) {
-                                       xmlValue = String.Empty;
-                               } else {
-                                       int bufSize = 8192;
-                                       StringBuilder sb = new StringBuilder (len);
-                               
-                                       value.Position = 0;
-                                       // Now read value into a byte buffer.
-                                       byte [] bytes = null;
-                               
-                                       if (len < bufSize)
-                                               bufSize = len;
-                                       bytes = new byte [bufSize];
-
-                                       while (len > 0) {
-                                               // Read may return anything from 0 to bufSize.
-                                               int n = value.Read(bytes, 0, bufSize);
-                                               sb.Append (Encoding.Unicode.GetString (bytes, 0, n));
-                                       
-                                               // The end of the file is reached.
-                                               if (n==0)
-                                                   break;
-                                               len -= n;
-                                       }
-                                       xmlValue = sb.ToString ();
-                               }
-                               notNull = true;
-                       }
-               }
-
-               public SqlXml (XmlReader value)
-               {
-                       if (value == null) {
-                               notNull = false;
-                               xmlValue = null;
-                       } else {
-                               if (value.Read ()) {
-                                       value.MoveToContent ();
-                                       xmlValue = value.ReadOuterXml();
-                               } else 
-                                       xmlValue = String.Empty;
-                               notNull = true;
-                       }
-               }
-
-               public bool IsNull {
-                       get { return !notNull; }
-               }
-
-               public static SqlXml Null {
-                       get {
-                               return new SqlXml ();
-                       }
-               }
-
-               public string Value {
-                       get {
-                               if (notNull)
-                                       return xmlValue;
-                               throw new SqlNullValueException ();
-                       }
-               }
-
-               public static XmlQualifiedName GetXsdType (XmlSchemaSet schemaSet)
-               {
-                       XmlQualifiedName qualifiedName = new XmlQualifiedName ("anyType", "http://www.w3.org/2001/XMLSchema");
-                       return qualifiedName;
-               }
-
-               public XmlReader CreateReader ()
-               {
-                       if (notNull) {
-                               XmlReaderSettings xs = new XmlReaderSettings ();
-                               xs.ConformanceLevel = ConformanceLevel.Fragment;
-                               return XmlTextReader.Create (new StringReader (xmlValue), xs);
-                       } else
-                               throw new SqlNullValueException (); 
-               }
-
-               [MonoTODO]
-               XmlSchema IXmlSerializable.GetSchema ()
-               {
-                       throw new NotImplementedException ();
-               }
-               
-               [MonoTODO]
-               void IXmlSerializable.ReadXml (XmlReader r)
-               {
-                       throw new NotImplementedException ();
-               }
-               
-               [MonoTODO]
-               void IXmlSerializable.WriteXml (XmlWriter writer) 
-               {
-                       throw new NotImplementedException ();
-               }
-       }
-}
-
index 49d876e35fe76846ec68ffd03aad17acde43aacc..5ab6c408f828b067b0c92a8b70836bee11e21090 100644 (file)
@@ -69,7 +69,6 @@ System.Data.SqlClient/SqlRowsCopiedEventArgs.cs
 System.Data.SqlClient/SqlNotificationEventArgs.cs
 System.Data.SqlClient/OnChangeEventHandler.cs
 System.Data.SqlClient/SqlDecimalExtensions.cs
-System.Data.SqlTypes/SqlXml.cs
 
 System.Data.Common/DbTypes.cs
 System.Data.Common/ExceptionHelper.cs
index b1b921bbb8c9c185280ba0f5baa737c7f6852478..e0de350dcf6af6394c11447281d8cc013ff6f266 100644 (file)
 ../../../external/referencesource/System.Data/System/Data/SQLTypes/SQLSingle.cs
 ../../../external/referencesource/System.Data/System/Data/SQLTypes/SQLString.cs
 ../../../external/referencesource/System.Data/System/Data/SQLTypes/SQLUtility.cs
+../../../external/referencesource/System.Data/System/Data/SQLTypes/SqlXml.cs
index 59c3b8483883ba8d0b3b56d345afee2a861a696a..b86e2fd6a9fc15f859240c659c9d8079dbae9246 100644 (file)
@@ -67,7 +67,6 @@ System.Data.SqlClient/SqlRowsCopiedEventArgs.cs
 System.Data.SqlClient/SqlNotificationEventArgs.cs
 System.Data.SqlClient/OnChangeEventHandler.cs
 System.Data.SqlClient/SqlDecimalExtensions.cs
-System.Data.SqlTypes/SqlXml.cs
 
 System.Data.Common/DbTypes.cs
 System.Data.Common/ExceptionHelper.cs
index 04985c2d9bf173f0c6e559d84f547384601c6ee4..adc70c5628d43b54d2f0c80128763c3954424c17 100644 (file)
 ../../../external/referencesource/System.Data/System/Data/SQLTypes/SQLSingle.cs
 ../../../external/referencesource/System.Data/System/Data/SQLTypes/SQLString.cs
 ../../../external/referencesource/System.Data/System/Data/SQLTypes/SQLUtility.cs
+../../../external/referencesource/System.Data/System/Data/SQLTypes/SqlXml.cs