diff --git a/build.proj b/build.proj
index 124837c2d2..14efda3f4a 100644
--- a/build.proj
+++ b/build.proj
@@ -71,7 +71,7 @@
-
+
@@ -113,7 +113,9 @@
+
+
diff --git a/doc/samples/IBinarySerialize.cs b/doc/samples/IBinarySerialize.cs
index 749ee5f3f6..64f314f86d 100644
--- a/doc/samples/IBinarySerialize.cs
+++ b/doc/samples/IBinarySerialize.cs
@@ -2,7 +2,7 @@
using System.IO;
using System.Data;
using System.Data.SqlTypes;
-using Microsoft.Data.SqlClient.Server;
+using Microsoft.SqlServer.Server;
using System.Text;
namespace test
@@ -45,7 +45,7 @@ static void Main(string[] args)
// Bytes 0 - 19: string text, padded to the right with null characters
// Bytes 20+: Double value
- // using Microsoft.Data.SqlClient.Server;
+ // using Microsoft.SqlServer.Server;
public void Read(System.IO.BinaryReader r)
{
@@ -84,7 +84,7 @@ public void Read(System.IO.BinaryReader r)
// Bytes 0 - 19: string text, padded to the right with null characters
// Bytes 20+: Double value
- // using Microsoft.Data.SqlClient.Server;
+ // using Microsoft.SqlServer.Server;
public void Write(System.IO.BinaryWriter w)
{
int maxStringSize = 20;
diff --git a/doc/samples/SqlFunctionAttribute.cs b/doc/samples/SqlFunctionAttribute.cs
index 6f20986cf6..28a027caad 100644
--- a/doc/samples/SqlFunctionAttribute.cs
+++ b/doc/samples/SqlFunctionAttribute.cs
@@ -2,7 +2,7 @@
using System.IO;
using System.Collections;
//
-using Microsoft.Data.SqlClient.Server;
+using Microsoft.SqlServer.Server;
public class Class1
{
diff --git a/doc/samples/SqlUserDefinedAggregate.cs b/doc/samples/SqlUserDefinedAggregate.cs
index 45a45dff7c..7f3792c133 100644
--- a/doc/samples/SqlUserDefinedAggregate.cs
+++ b/doc/samples/SqlUserDefinedAggregate.cs
@@ -1,20 +1,20 @@
using System;
//
-using Microsoft.Data.SqlClient.Server;
+using Microsoft.SqlServer.Server;
using System.IO;
using System.Data.Sql;
using System.Data.SqlTypes;
using System.Text;
[Serializable]
-[Microsoft.Data.SqlClient.Server.SqlUserDefinedAggregate(
- Microsoft.Data.SqlClient.Server.Format.UserDefined,
+[Microsoft.SqlServer.Server.SqlUserDefinedAggregate(
+ Microsoft.SqlServer.Server.Format.UserDefined,
IsInvariantToNulls = true,
IsInvariantToDuplicates = false,
IsInvariantToOrder = false,
MaxByteSize = 8000)
]
-public class Concatenate : Microsoft.Data.SqlClient.Server.IBinarySerialize
+public class Concatenate : Microsoft.SqlServer.Server.IBinarySerialize
{
public void Read(BinaryReader r)
diff --git a/doc/samples/SqlUserDefinedType1.cs b/doc/samples/SqlUserDefinedType1.cs
index 5601a016b1..8f440648c2 100644
--- a/doc/samples/SqlUserDefinedType1.cs
+++ b/doc/samples/SqlUserDefinedType1.cs
@@ -2,7 +2,7 @@
//
using System;
using System.Data.SqlTypes;
-using Microsoft.Data.SqlClient.Server;
+using Microsoft.SqlServer.Server;
[Serializable()]
[SqlUserDefinedType(Format.Native)]
@@ -133,7 +133,7 @@ public SqlString Quadrant()
//-----------------------------------------------------------------------------
//
-// using Microsoft.Data.SqlClient.Server;
+// using Microsoft.SqlServer.Server;
[SqlUserDefinedType(Format.Native, MaxByteSize = 8000)]
public class SampleType
diff --git a/doc/snippets/Microsoft.Data.SqlClient.Server/DataAccessKind.xml b/doc/snippets/Microsoft.Data.SqlClient.Server/DataAccessKind.xml
deleted file mode 100644
index d429e11dd9..0000000000
--- a/doc/snippets/Microsoft.Data.SqlClient.Server/DataAccessKind.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-
-
-
-
- Describes the type of access to user data for a user-defined method or function.
-
- and to indicate whether the method or function uses ADO.NET to connect back to the database using the "context connection."
-
- Note that methods and functions are not allowed to make changes to the database, so the options for this enumeration are `None` (meaning no data-access performed by the method or function) and `Read` (meaning that the method or function perform read-only data-access operations, such as executing SELECT statements).
-
- ]]>
-
-
-
- The method or function does not access user data.
-
-
- The method or function reads user data.
-
-
-
diff --git a/doc/snippets/Microsoft.Data.SqlClient.Server/Format.xml b/doc/snippets/Microsoft.Data.SqlClient.Server/Format.xml
deleted file mode 100644
index b15cd6eadb..0000000000
--- a/doc/snippets/Microsoft.Data.SqlClient.Server/Format.xml
+++ /dev/null
@@ -1,51 +0,0 @@
-
-
-
-
- Used by and to indicate the serialization format of a user-defined type (UDT) or aggregate.
-
- and to indicate the serialization format of a user-defined type (UDT) or aggregate. Use of the `Native` and `UserDefined` enumeration members has special requirements.
-- `Format.Native`
- The requirements for the `Format.Native` format are:
-
- - The with a property value of must be applied to the aggregate or UDT if it is defined in a class and not a structure. This controls the physical layout of the data fields and is used to force the members to be laid out sequentially in the order they appear. SQL Server uses this attribute to determine the field order for UDTs with multiple fields.
-
- - The type must contain at least one member (serialized values cannot be zero bytes in size).
-
- - All the fields of the aggregate must be *blittable*; that is, they must have a common representation in both managed and unmanaged memory and not require special handling by the interop marshaler.
-
- - All the fields of the UDT should be of one of the following types that can be serialized: `bool`, `byte`, `sbyte`, `short`, `ushort`, `int`, `uint`, `long`, `ulong`, `float`, `double`, , , , , , , , , or other value types defined by the user that contain fields of one of these types.
- - The aggregate must not specify a value for `MaxByteSize`.
-
- - The aggregate must not have any [NonSerialized] fields.
-
- - Fields must not be marked as an explicit layout (with a of ).
-- `Format.UserDefined`
- The requirements for the `Format.UserDefined` format are:
- - The aggregate must specify a value for `MaxByteSize`.
-
- - Specify the attribute property. The default value is `false`.
-
- - If you omit any field in the or methods, the state of that field is not serialized.
-## Examples
-The following example shows the `UserDefinedType` attribute of the Point UDT. The UDT is byte-ordered, is named "Point", has a validation method named "ValidatePoint", and uses the native serialization format.
-
-[!code-csharp[SqlUserDefinedType Example#1](~/../sqlclient/doc/samples/SqlUserDefinedType.cs#1)]
-
- ]]>
-
-
-
- This serialization format uses a very simple algorithm that enables SQL Server to store an efficient representation of the UDT on disk. Types marked for serialization can only have value types (structs in Microsoft Visual C# and structures in Microsoft Visual Basic .NET) as members. Members of reference types (such as classes in Visual C# and Visual Basic), either user-defined or those existing in .NET class libraries (such as ), are not supported.
-
-
- The serialization format is unknown.
-
-
- This serialization format gives the developer full control over the binary format through the and methods.
-
-
-
diff --git a/doc/snippets/Microsoft.Data.SqlClient.Server/IBinarySerialize.xml b/doc/snippets/Microsoft.Data.SqlClient.Server/IBinarySerialize.xml
deleted file mode 100644
index a84e479859..0000000000
--- a/doc/snippets/Microsoft.Data.SqlClient.Server/IBinarySerialize.xml
+++ /dev/null
@@ -1,54 +0,0 @@
-
-
-
-
- Provides custom implementation for user-defined type (UDT) and user-defined aggregate serialization and deserialization.
-
- .`Native` or .`UserDefined`.
-
- .`Native` allows SQL Server to handle serialization and deserialization automatically, but the format has restrictions on the kind of types it can handle. .`UserDefined` allows user-defined types and aggregates to handle their own serialization. User-defined types and aggregates must be marked with .`UserDefined` in the `SqlUserDefinedType` or `SqlUserDefinedAggregate` attribute, and must implement the interface.
-
- Note that even with custom serialization, the total size of each instance must be under the maximum allowed limit, currently 8000 bytes.
-
- ]]>
-
-
-
- The stream from which the object is deserialized.
- Generates a user-defined type (UDT) or user-defined aggregate from its binary form.
-
- method must reconstitute your object using the information written by the method.
-
-## Examples
- The following example shows the implementation of the method of a UDT, which uses a to de-serialize a previously persisted UDT. This example assumes that the UDT has two data properties: `StringValue` and `DoubleValue`.
-
- [!code-csharp[IBinarySerialize Samples#1](~/../sqlclient/doc/samples/IBinarySerialize.cs#1)]
-
- ]]>
-
-
-
- The stream to which the UDT or user-defined aggregate is serialized.
- Converts a user-defined type (UDT) or user-defined aggregate into its binary format so that it may be persisted.
-
- method to reconstitute your UDT or user-defined aggregate.
-
-## Examples
- The following example shows the implementation of the method of a UDT, which uses a to serialize the UDT in the user-defined binary format. The purpose of the null character padding is to ensure that the string value is completely separated from the double value, so that one UDT is compared to another in Transact-SQL code, string bytes are compared to string bytes and double bytes are compared to double bytes.
-
- [!code-csharp[IBinarySerialize Samples#2](~/../sqlclient/doc/samples/IBinarySerialize.cs#2)]
-
- ]]>
-
-
-
-
diff --git a/doc/snippets/Microsoft.Data.SqlClient.Server/InvalidUdtException.xml b/doc/snippets/Microsoft.Data.SqlClient.Server/InvalidUdtException.xml
deleted file mode 100644
index 70bfd160f4..0000000000
--- a/doc/snippets/Microsoft.Data.SqlClient.Server/InvalidUdtException.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-
-
-
-
- Thrown when SQL Server or the ADO.NET provider detects an invalid user-defined type (UDT).
- To be added.
-
-
- The object.
- The object.
- Streams all the properties into the class for the given .
-
- class to make the class serializable.
-
- ]]>
-
-
-
-
diff --git a/doc/snippets/Microsoft.Data.SqlClient.Server/SqlFacetAttribute.xml b/doc/snippets/Microsoft.Data.SqlClient.Server/SqlFacetAttribute.xml
deleted file mode 100644
index bbe76cdd22..0000000000
--- a/doc/snippets/Microsoft.Data.SqlClient.Server/SqlFacetAttribute.xml
+++ /dev/null
@@ -1,124 +0,0 @@
-
-
-
-
- Annotates the returned result of a user-defined type (UDT) with additional information that can be used in Transact-SQL.
-
- may only be specified on non-void return values.
-
- is used only to derive information about the return type, and is not intended to be a constraint specification on what can be stored in the type. Thus, if a field has a indicating its size to be 2 characters, then the SQL Server type of the field access expression is of size 2, but assignments into the field are not restricted by this facet.
-
- The table below captures the matrix of valid values for the various properties for specific field types. In this table, "Y" indicates that the property is valid, and "N" indicates that the property is not valid.
-
- The specified must be compatible with the field type. If the property is not valid, type registration will report an error if the user specifies a non-default value for the property. The maximum values for and properties are 38. For the property, the value should be in the range of 1-8000 for binary and non-Unicode data, 1-4000 for Unicode data, or -1. All other values are not valid.
-
-|Type|IsFixedLength|MaxSize|Precision|Scale|IsNullable|
-|----------|-------------------|-------------|---------------|-----------|----------------|
-||N|N|N|N|Y|
-||N|N|N|N|Y|
-||N|N|N|N|Y|
-||N|N|N|N|Y|
-||N|N|N|N|Y|
-||N|N|N|N|Y|
-||N|N|N|N|Y|
-||N|N|N|N|Y|
-||N|N|N|N|Y|
-||N|N|N|N|Y|
-||N|N|Y|Y|Y|
-||Y|Y|N|N|Y|
-||Y|Y|N|N|Y|
-||N|N|N|N|Y|
-||Y|Y|N|N|Y|
-||Y|Y|N|N|Y|
-|Embedded UDTs|N|N|N|N|Y|
-||Y|Y|N|N|Y|
-|Byte[]|Y|Y|N|N|Y|
-|Char[]|Y|Y|N|N|Y|
-||N|N|N|Y1|N|
-||N|N|Y|Y|Y|
-
- (1) Specifying the scale on a DateTime type will cause the value to be returned to Transact-SQL as a DateTime2 type with the specified scale.
-
- ]]>
-
-
-
- An optional attribute on a user-defined type (UDT) return type, used to annotate the returned result with additional information that can be used in Transact-SQL.
- To be added.
-
-
- Indicates whether the return type of the user-defined type is of a fixed length.
-
- if the return type is of a fixed length; otherwise .
-
- property is set to 1.
-
-The default value is `false`.
-
-]]>
-
-
-
- Indicates whether the return type of the user-defined type can be .
-
- if the return type of the user-defined type can be ; otherwise .
-
-
-
-
-
- The maximum size, in logical units, of the underlying field type of the user-defined type.
- An representing the maximum size, in logical units, of the underlying field type.
-
-
-
-
-
- The precision of the return type of the user-defined type.
- An representing the precision of the return type.
-
- property is valid only for numeric types. The property must also be specified when setting the property.
-
- The maximum value of the property is 38; the default value is 38.
-
- ]]>
-
-
-
- The scale of the return type of the user-defined type.
- An representing the scale of the return type.
-
- property is valid only for decimal types. The property must also be specified when setting the property.
-
- The maximum value of the property is 38; the default value is 0.
-
- ]]>
-
-
-
-
diff --git a/doc/snippets/Microsoft.Data.SqlClient.Server/SqlFunctionAttribute.xml b/doc/snippets/Microsoft.Data.SqlClient.Server/SqlFunctionAttribute.xml
deleted file mode 100644
index 7221363628..0000000000
--- a/doc/snippets/Microsoft.Data.SqlClient.Server/SqlFunctionAttribute.xml
+++ /dev/null
@@ -1,125 +0,0 @@
-
-
-
-
- Used to mark a method definition of a user-defined aggregate as a function in SQL Server. The properties on the attribute reflect the physical characteristics used when the type is registered with SQL Server.
-
-
-
-
-
- An optional attribute on a user-defined aggregate, used to indicate that the method should be registered in SQL Server as a function. Also used to set the , , , , , , and properties of the function attribute.
- To be added.
-
-
- Indicates whether the function involves access to user data stored in the local instance of SQL Server.
-
- .: Does not access data. .: Only reads user data.
-
- . is also required when connecting to remote servers if transactions integration is required (the default).
-
-If a Transact-SQL query is executed from inside a table-valued function (TVF), the property should be set.
-
-]]>
-
-
-
- The name of a method in the same class which is used to fill a row of data in the table returned by the table-valued function.
- A value representing the name of a method in the same class which is used to fill a row of data in the table returned by the table-valued function.
-
-
- Indicates whether the user-defined function is deterministic.
-
- if the function is deterministic; otherwise .
-
- property is also useful for indexing the result of the function in the form of indexed computed columns and indexed views. If this property is not specified, the function is assumed to be non-deterministic.
-
-Functions that access local data can be deterministic. The data access characteristic is captured separately by the and properties.
-
-Note that data access to remote servers (for example, using a to connect to another SQL Server instance) is available in user-defined functions. However, you must still honor the declaration. If the common language runtime (CLR) function is marked as deterministic, it should not cause side-effects in the remote server. While side-effects against the context connection are restricted, SQL Server will not enforce the restriction for side-effects over remote connections.
-
-The default value of this attribute is `false`.
-
-Do not mark a function as deterministic if the function does not always produce the same output values, given the same input values and the same database state. Marking a function as deterministic when the function is not truly deterministic can result in corrupted indexed views and computed columns.
-
-]]>
-
-
-
- Indicates whether the function involves imprecise computations, such as floating point operations.
-
- if the function involves precise computations; otherwise .
-
-
-
-
-
- The name under which the function should be registered in SQL Server.
- A value representing the name under which the function should be registered.
-
-
-
-
-
- Indicates whether the function requires access to data stored in the system catalogs or virtual system tables of SQL Server.
-
- .: Does not access system data. .: Only reads system data.
-
- .
-
-]]>
-
-
-
- A string that represents the table definition of the results, if the method is used as a table-valued function (TVF).
- A value representing the table definition of the results.
-
-
-
-
-
-
diff --git a/doc/snippets/Microsoft.Data.SqlClient.Server/SqlMethodAttribute.xml b/doc/snippets/Microsoft.Data.SqlClient.Server/SqlMethodAttribute.xml
deleted file mode 100644
index 95f73cda49..0000000000
--- a/doc/snippets/Microsoft.Data.SqlClient.Server/SqlMethodAttribute.xml
+++ /dev/null
@@ -1,68 +0,0 @@
-
-
-
-
- Indicates the determinism and data access properties of a method or property on a user-defined type (UDT). The properties on the attribute reflect the physical characteristics that are used when the type is registered with SQL Server.
-
- should be used on the setter or the getter directly.
-
- inherits from a , so inherits the `FillRowMethodName` and `TableDefinition` fields from . Note that it is not possible to write a table-valued method, although the names of these fields might suggest that it is possible.
-
-## Examples
-The following example shows a UDT method that is attributed to indicate that the method will not be invoked on null instances of the type, that the method will not change the state of the type, and that the method will not be called when `null` parameters are supplied to the method invocation.
-
-[!code-csharp[SqlMethod Sample#1](~/../sqlclient/doc/samples/SqlMethod.cs#1)]
-
-]]>
-
-
-
- An attribute on a user-defined type (UDT), used to indicate the determinism and data access properties of a method or a property on a UDT.
- To be added.
-
-
- Indicates whether SQL Server should invoke the method on null instances.
- if SQL Server should invoke the method on null instances; otherwise, . If the method cannot be invoked (because of an attribute on the method), the SQL Server is returned.
-
-
-
-
-
- Indicates whether a method on a user-defined type (UDT) is a mutator.
- if the method is a mutator; otherwise .
-
- property is set to `true` and the return type of the method is `void`, SQL Server marks the method as a mutator. A mutator method is one that causes a state change in the UDT instance. Mutator methods can be called in assignment statements or data modification statements, but cannot be used in queries. If a method is marked as a mutator but does not return void, then CREATE TYPE does not fail with an error. Even though a returned value other than `void` does not raise an error, the returned value is not accessible and cannot be used.
-
-The default value of the property is `false`.
-
-A property can be a mutator if is used on the setter and is set to `true`. However, a property setter is implicitly treated as a mutator, so it is not necessary to set the property of the to `true`.
-
-]]>
-
-
-
- Indicates whether the method on a user-defined type (UDT) is called when input arguments are specified in the method invocation.
- if the method is called when input arguments are specified in the method invocation; if the method returns a value when any of its input parameters are . If the method cannot be invoked (because of an attribute on the method), the SQL Server is returned.
-
- property is `true`.
-
-]]>
-
-
-
-
diff --git a/doc/snippets/Microsoft.Data.SqlClient.Server/SqlUserDefinedAggregateAttribute.xml b/doc/snippets/Microsoft.Data.SqlClient.Server/SqlUserDefinedAggregateAttribute.xml
deleted file mode 100644
index 5822bac69d..0000000000
--- a/doc/snippets/Microsoft.Data.SqlClient.Server/SqlUserDefinedAggregateAttribute.xml
+++ /dev/null
@@ -1,132 +0,0 @@
-
-
-
-
- Indicates that the type should be registered as a user-defined aggregate. The properties on the attribute reflect the physical attributes used when the type is registered with SQL Server. This class cannot be inherited.
-
- custom attribute. Every user-defined aggregate must be annotated with this attribute.
-
-See "CLR User-Defined Aggregates" in SQL Server 2005 Books Online for more information on user-defined aggregates and examples.
-
-## Examples
-The following example shows the attribute for a user-defined aggregate. The aggregate uses custom serialization, has a maximum size of 8000 bytes when serialized, and is invariant to nulls, duplicates, and order.
-
-[!code-csharp[SqlUserDefinedAggregate Sample#1](~/../sqlclient/doc/samples/SqlUserDefinedAggregate.cs#1)]
-
-]]>
-
-
-
- One of the values representing the serialization format of the aggregate.
- A required attribute on a user-defined aggregate, used to indicate that the given type is a user-defined aggregate and the storage format of the user-defined aggregate.
-
-
- The serialization format as a .
- A representing the serialization format.
-
-
-
-
-
- Indicates whether the aggregate is invariant to duplicates.
- if the aggregate is invariant to duplicates; otherwise .
-
-
-
-
-
- Indicates whether the aggregate is invariant to nulls.
- if the aggregate is invariant to nulls; otherwise .
-
-
-
-
-
- Indicates whether the aggregate is invariant to order.
- if the aggregate is invariant to order; otherwise .
-
-
-
-
-
- Indicates whether the aggregate returns if no values have been accumulated.
- if the aggregate returns if no values have been accumulated; otherwise .
-
-
-
-
-
- The maximum size, in bytes, of the aggregate instance.
- An value representing the maximum size of the aggregate instance.
-
- property with the UserDefined serialization .
-
-The maximum allowed value for this property is specified by the field.
-
-The maximum size allowed is 2 gigabytes (GB). You can specify a number from 1 to 8000 bytes, or -1 to represent a value larger than 8000 bytes, up to 2 gigabytes.
-
-For an aggregate with user-defined serialization specified, refers to the total size of the serialized data. Consider an aggregate serializing a string of 10 characters (). When the string is serialized using a , the total size of the serialized string is 22 bytes: 2 bytes per Unicode UTF-16 character, multiplied by the maximum number of characters, plus 2 control bytes of overhead incurred from serializing a binary stream. So, when determining the value of , the total size of the serialized data must be considered: the size of the data serialized in binary form plus the overhead incurred by serialization.
-
-]]>
-
-
-
- The maximum size, in bytes, required to store the state of this aggregate instance during computation.
-
- value representing the maximum size of the aggregate instance.
-
-]]>
-
-
-
- The name of the aggregate.
- A value representing the name of the aggregate.
-
-
-
diff --git a/doc/snippets/Microsoft.Data.SqlClient.Server/SqlUserDefinedTypeAttribute.xml b/doc/snippets/Microsoft.Data.SqlClient.Server/SqlUserDefinedTypeAttribute.xml
deleted file mode 100644
index 14bc23a2bd..0000000000
--- a/doc/snippets/Microsoft.Data.SqlClient.Server/SqlUserDefinedTypeAttribute.xml
+++ /dev/null
@@ -1,137 +0,0 @@
-
-
-
-
- Used to mark a type definition in an assembly as a user-defined type (UDT) in SQL Server. The properties on the attribute reflect the physical characteristics used when the type is registered with SQL Server. This class cannot be inherited.
-
- custom attribute. Every UDT must be annotated with this attribute. See [CLR User-Defined Types](https://go.microsoft.com/fwlink/?LinkId=128028) for more information about UDTs, including an example of a UDT.
-
-## Examples
-The following example shows the `UserDefinedType` attribute of the Point UDT. The UDT is byte-ordered, is named "Point", has a validation method named "ValidatePoint", and uses the native serialization format.
-
-[!code-csharp[SqlUserDefinedType Example#1](~/../sqlclient/doc/samples/SqlUserDefinedType.cs#1)]
-
-]]>
-
-
-
- One of the values representing the serialization format of the type.
- A required attribute on a user-defined type (UDT), used to confirm that the given type is a UDT and to indicate the storage format of the UDT.
-
-
-
-
-
- The serialization format as a .
- A value representing the serialization format.
-
-
- Indicates whether the user-defined type is byte ordered.
-
- if the user-defined type is byte ordered; otherwise .
-
- property in effect guarantees that the serialized binary data can be used for semantic ordering of the information. Thus, each instance of a byte-ordered UDT object can only have one serialized representation. When a comparison operation is performed in SQL Server on the serialized bytes, its results should be the same as if the same comparison operation had taken place in managed code.
-
-The following features are supported when is set to `true`:
-
-- The ability to create indexes on columns of this type.
-
-- The ability to create primary and foreign keys as well as CHECK and UNIQUE constraints on columns of this type.
-
-- The ability to use Transact-SQL ORDER BY, GROUP BY, and PARTITION BY clauses. In these cases, the binary representation of the type is used to determine the order.
-
-- The ability to use comparison operators in Transact-SQL statements.
-
-- The ability to persist computed columns of this type.
-
-Note that both the `Native` and `UserDefined` serialization formats support the following comparison operators when is set to `true`:
-
-- Equal to (=)
-
-- Not equal to (!=)
-
-- Greater than (>)
-
-- Less than (\<)
-
-- Greater than or equal to (>=)
-
-- Less than or equal to (<=)
-
-]]>
-
-
-
- Indicates whether all instances of this user-defined type are the same length.
-
- if all instances of this type are the same length; otherwise .
-
-
- . This attribute is only relevant for UDTs with `UserDefined` serialization .
-
-]]>
-
-
-
- The maximum size of the instance, in bytes.
- An value representing the maximum size of the instance.
-
- property with the `UserDefined` serialization .
-
-When connecting to SQL Server 2005 or earlier, must be between 1 and 8000.
-
-When connecting to SQL Server 2008 or later, set between 1 and 8000, for a type whose instances are always 8,000 bytes or less. For types that can have instances larger than 8000, specify -1.
-
-For a UDT with user-defined serialization specified, refers to the total size of the UDT in its serialized form as defined by the user. Consider a UDT with a property of a string of 10 characters (). When the UDT is serialized using a , the total size of the serialized string is 22 bytes: 2 bytes per Unicode UTF-16 character, multiplied by the maximum number of characters, plus 2 control bytes of overhead incurred from serializing a binary stream. So, when determining the value of , the total size of the serialized UDT must be considered: the size of the data serialized in binary form plus the overhead incurred by serialization.
-
-This property should not be used with `Native` serialization .
-
-]]>
-
-
-
- The SQL Server name of the user-defined type.
- A value representing the SQL Server name of the user-defined type.
-
- property is not used within SQL Server, but is used by the Microsoft Visual Studio .NET Integrated Development Environment (IDE).
-
-]]>
-
-
-
- The name of the method used to validate instances of the user-defined type.
- A representing the name of the method used to validate instances of the user-defined type.
-
-
-
-
-
-
diff --git a/doc/snippets/Microsoft.Data.SqlClient.Server/SystemDataAccessKind.xml b/doc/snippets/Microsoft.Data.SqlClient.Server/SystemDataAccessKind.xml
deleted file mode 100644
index e2209278d7..0000000000
--- a/doc/snippets/Microsoft.Data.SqlClient.Server/SystemDataAccessKind.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-
-
-
-
- Describes the type of access to system data for a user-defined method or function.
-
- and to indicate what type of access to system data the method or function has.
-
- Note that methods and functions are not allowed to make changes to the database, so the options for this enumeration are `None` (meaning no data-access performed by the method or function) and `Read` (meaning that the method or function performs read-only data-access operations, such as executing SELECT statements).
-
- ]]>
-
-
-
- The method or function does not access system data.
-
-
- The method or function reads system data.
-
-
-
diff --git a/src/Directory.Build.props b/src/Directory.Build.props
index 0cca6a4cb5..afcf503118 100644
--- a/src/Directory.Build.props
+++ b/src/Directory.Build.props
@@ -46,6 +46,7 @@
$(ManagedSourceCode)netfx\$(ManagedSourceCode)netfx\src\Resources\$(ManagedSourceCode)add-ons\
+ $(RepoRoot)src\Microsoft.SqlServer.Server\$(Artifacts)obj\$(NetCoreSource)src\Common\src$(NetCoreSource)src\Common\tests
diff --git a/src/Microsoft.Data.SqlClient/netcore/ref/Microsoft.Data.SqlClient.cs b/src/Microsoft.Data.SqlClient/netcore/ref/Microsoft.Data.SqlClient.cs
index 1ad71cac75..1c7d0e0571 100644
--- a/src/Microsoft.Data.SqlClient/netcore/ref/Microsoft.Data.SqlClient.cs
+++ b/src/Microsoft.Data.SqlClient/netcore/ref/Microsoft.Data.SqlClient.cs
@@ -1832,37 +1832,6 @@ public sealed class SqlConfigurableRetryFactory
}
namespace Microsoft.Data.SqlClient.Server
{
- ///
- public enum DataAccessKind
- {
- ///
- None = 0,
- ///
- Read = 1
- }
- ///
- public enum Format
- {
- ///
- Unknown = 0,
- ///
- Native = 1,
- ///
- UserDefined = 2
- }
- ///
- public interface IBinarySerialize
- {
- ///
- void Read(System.IO.BinaryReader r);
- ///
- void Write(System.IO.BinaryWriter w);
- }
- ///
- public sealed partial class InvalidUdtException : System.SystemException
- {
- internal InvalidUdtException() { }
- }
///
public partial class SqlDataRecord : System.Data.IDataRecord
{
@@ -2033,44 +2002,6 @@ public virtual void SetValue(int ordinal, object value) { }
///
public virtual int SetValues(params object[] values) { throw null; }
}
- ///
- [System.AttributeUsageAttribute(System.AttributeTargets.Field | System.AttributeTargets.Property | System.AttributeTargets.ReturnValue | System.AttributeTargets.Parameter, AllowMultiple = false, Inherited = false)]
- public partial class SqlFacetAttribute : System.Attribute
- {
- ///
- public SqlFacetAttribute() { }
- ///
- public bool IsFixedLength { get { throw null; } set { } }
- ///
- public bool IsNullable { get { throw null; } set { } }
- ///
- public int MaxSize { get { throw null; } set { } }
- ///
- public int Precision { get { throw null; } set { } }
- ///
- public int Scale { get { throw null; } set { } }
- }
- ///
- [System.AttributeUsage(System.AttributeTargets.Method, AllowMultiple = false, Inherited = false), System.SerializableAttribute]
- public partial class SqlFunctionAttribute : System.Attribute
- {
- ///
- public SqlFunctionAttribute() { }
- ///
- public bool IsDeterministic { get { throw null; } set { } }
- ///
- public DataAccessKind DataAccess { get { throw null; } set { } }
- ///
- public SystemDataAccessKind SystemDataAccess { get { throw null; } set { } }
- ///
- public bool IsPrecise { get { throw null; } set { } }
- ///
- public string Name { get { throw null; } set { } }
- ///
- public string TableDefinition { get { throw null; } set { } }
- ///
- public string FillRowMethodName { get { throw null; } set { } }
- }
///
public sealed partial class SqlMetaData
{
@@ -2209,69 +2140,6 @@ public SqlMetaData(string name, System.Data.SqlDbType dbType, System.Type userDe
///
public static Microsoft.Data.SqlClient.Server.SqlMetaData InferFromValue(object value, string name) { throw null; }
}
- ///
- [System.AttributeUsage(System.AttributeTargets.Method, AllowMultiple = false, Inherited = false), System.SerializableAttribute]
- public sealed partial class SqlMethodAttribute : SqlFunctionAttribute
- {
- ///
- public SqlMethodAttribute() { }
- ///
- public bool OnNullCall { get { throw null; } set { } }
- ///
- public bool IsMutator { get { throw null; } set { } }
- ///
- public bool InvokeIfReceiverIsNull { get { throw null; } set { } }
- }
- ///
- [System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Struct, AllowMultiple = false, Inherited = false)]
- public sealed partial class SqlUserDefinedAggregateAttribute : System.Attribute
- {
- ///
- public const int MaxByteSizeValue = 8000;
- ///
- public SqlUserDefinedAggregateAttribute(Format format) { }
- ///
- public int MaxByteSize { get { throw null; } set { } }
- ///
- public bool IsInvariantToDuplicates { get { throw null; } set { } }
- ///
- public bool IsInvariantToNulls { get { throw null; } set { } }
- ///
- public bool IsInvariantToOrder { get { throw null; } set { } }
- ///
- public bool IsNullIfEmpty { get { throw null; } set { } }
- ///
- public Format Format { get { throw null; } }
- ///
- public string Name { get { throw null; } set { } }
- }
- ///
- [System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Struct, AllowMultiple = false, Inherited = true)]
- public sealed partial class SqlUserDefinedTypeAttribute : System.Attribute
- {
- ///
- public SqlUserDefinedTypeAttribute(Format format) { }
- ///
- public int MaxByteSize { get { throw null; } set { } }
- ///
- public bool IsFixedLength { get { throw null; } set { } }
- ///
- public bool IsByteOrdered { get { throw null; } set { } }
- ///
- public Format Format { get { throw null; } }
- ///
- public string ValidationMethodName { get { throw null; } set { } }
- ///
- public string Name { get { throw null; } set { } }
- }
- ///
- public enum SystemDataAccessKind
- {
- ///
- None = 0,
- ///
- Read = 1
- }
}
namespace Microsoft.Data.SqlClient.DataClassification
{
diff --git a/src/Microsoft.Data.SqlClient/netcore/src/Microsoft.Data.SqlClient.csproj b/src/Microsoft.Data.SqlClient/netcore/src/Microsoft.Data.SqlClient.csproj
index 71a3b17641..7612d1c7de 100644
--- a/src/Microsoft.Data.SqlClient/netcore/src/Microsoft.Data.SqlClient.csproj
+++ b/src/Microsoft.Data.SqlClient/netcore/src/Microsoft.Data.SqlClient.csproj
@@ -178,12 +178,6 @@
Microsoft\Data\SqlClient\Server\ExtendedClrTypeCode.cs
-
- Microsoft\Data\SqlClient\Server\IBinarySerialize.cs
-
-
- Microsoft\Data\SqlClient\Server\InvalidUdtException.cs
-
Microsoft\Data\SqlClient\Server\ITypedGetters.cs
@@ -238,18 +232,9 @@
Microsoft\Data\SqlClient\Server\SqlDataRecord.netcore.cs
-
- Microsoft\Data\SqlClient\Server\SqlFacetAttribute.cs
-
-
- Microsoft\Data\SqlClient\Server\SqlFunctionAttribute.cs
-
Microsoft\Data\SqlClient\Server\SqlMetaData.cs
-
- Microsoft\Data\SqlClient\Server\SqlMethodAttribute.cs
-
Microsoft\Data\SqlClient\Server\SqlNormalizer.cs
@@ -259,12 +244,6 @@
Microsoft\Data\SqlClient\SqlTransaction.Common.cs
-
- Microsoft\Data\SqlClient\Server\SqlUserDefinedAggregateAttribute.cs
-
-
- Microsoft\Data\SqlClient\Server\SqlUserDefinedTypeAttribute.cs
-
Microsoft\Data\SqlClient\Server\ValueUtilsSmi.cs
@@ -960,6 +939,9 @@
Microsoft.Data.SqlClient.SqlMetaData.xml
+
+
+
diff --git a/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlConnection.cs b/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlConnection.cs
index 08f32ef0bf..660b5934e0 100644
--- a/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlConnection.cs
+++ b/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlConnection.cs
@@ -21,7 +21,7 @@
using System.Threading.Tasks;
using Microsoft.Data.Common;
using Microsoft.Data.ProviderBase;
-using Microsoft.Data.SqlClient.Server;
+using Microsoft.SqlServer.Server;
namespace Microsoft.Data.SqlClient
{
@@ -2347,7 +2347,7 @@ internal object GetUdtValue(object value, SqlMetaDataPriv metaData, bool returnD
MemoryStream stm = new MemoryStream((byte[])value);
- o = SerializationHelperSql9.Deserialize(stm, metaData.udt?.Type);
+ o = Server.SerializationHelperSql9.Deserialize(stm, metaData.udt?.Type);
Debug.Assert(o != null, "object could NOT be created");
return o;
@@ -2375,7 +2375,7 @@ internal byte[] GetBytes(object o, out Format format, out int maxSize)
using (MemoryStream stm = new MemoryStream(maxSize < 0 ? 0 : maxSize))
{
- SerializationHelperSql9.Serialize(stm, o);
+ Server.SerializationHelperSql9.Serialize(stm, o);
retval = stm.ToArray();
}
return retval;
diff --git a/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/TdsParser.cs b/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/TdsParser.cs
index ec1e898691..4b03949d93 100644
--- a/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/TdsParser.cs
+++ b/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/TdsParser.cs
@@ -9418,7 +9418,7 @@ private Task TDSExecuteRPCAddParameter(TdsParserStateObject stateObj, SqlParamet
int maxSupportedSize = Is2008OrNewer ? int.MaxValue : short.MaxValue;
byte[] udtVal = null;
- Format format = Format.Native;
+ SqlServer.Server.Format format = SqlServer.Server.Format.Native;
if (string.IsNullOrEmpty(param.UdtTypeName))
{
diff --git a/src/Microsoft.Data.SqlClient/netfx/ref/Microsoft.Data.SqlClient.cs b/src/Microsoft.Data.SqlClient/netfx/ref/Microsoft.Data.SqlClient.cs
index 360d1c9c41..1bf34b20e8 100644
--- a/src/Microsoft.Data.SqlClient/netfx/ref/Microsoft.Data.SqlClient.cs
+++ b/src/Microsoft.Data.SqlClient/netfx/ref/Microsoft.Data.SqlClient.cs
@@ -1897,41 +1897,6 @@ public sealed class SqlConfigurableRetryFactory
}
namespace Microsoft.Data.SqlClient.Server
{
- ///
- public enum DataAccessKind
- {
- ///
- None = 0,
- ///
- Read = 1
- }
- ///
- public enum Format
- {
- ///
- Unknown = 0,
- ///
- Native = 1,
- ///
- UserDefined = 2
- }
- ///
- public interface IBinarySerialize
- {
- ///
- void Read(System.IO.BinaryReader r);
- ///
- void Write(System.IO.BinaryWriter w);
- }
-
- ///
- [System.Serializable]
- public sealed partial class InvalidUdtException : System.SystemException
- {
- internal InvalidUdtException() { }
- private InvalidUdtException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { }
-
- }
///
public partial class SqlDataRecord : System.Data.IDataRecord
{
@@ -2102,44 +2067,6 @@ public virtual void SetValue(int ordinal, object value) { }
///
public virtual int SetValues(params object[] values) { throw null; }
}
- ///
- [System.AttributeUsageAttribute(System.AttributeTargets.Field | System.AttributeTargets.Property | System.AttributeTargets.ReturnValue | System.AttributeTargets.Parameter, AllowMultiple = false, Inherited = false)]
- public partial class SqlFacetAttribute : System.Attribute
- {
- ///
- public SqlFacetAttribute() { }
- ///
- public bool IsFixedLength { get { throw null; } set { } }
- ///
- public bool IsNullable { get { throw null; } set { } }
- ///
- public int MaxSize { get { throw null; } set { } }
- ///
- public int Precision { get { throw null; } set { } }
- ///
- public int Scale { get { throw null; } set { } }
- }
- ///
- [System.AttributeUsage(System.AttributeTargets.Method, AllowMultiple = false, Inherited = false), System.SerializableAttribute]
- public partial class SqlFunctionAttribute : System.Attribute
- {
- ///
- public SqlFunctionAttribute() { }
- ///
- public bool IsDeterministic { get { throw null; } set { } }
- ///
- public DataAccessKind DataAccess { get { throw null; } set { } }
- ///
- public SystemDataAccessKind SystemDataAccess { get { throw null; } set { } }
- ///
- public bool IsPrecise { get { throw null; } set { } }
- ///
- public string Name { get { throw null; } set { } }
- ///
- public string TableDefinition { get { throw null; } set { } }
- ///
- public string FillRowMethodName { get { throw null; } set { } }
- }
///
public sealed partial class SqlMetaData
{
@@ -2278,69 +2205,6 @@ public SqlMetaData(string name, System.Data.SqlDbType dbType, System.Type userDe
///
public static Microsoft.Data.SqlClient.Server.SqlMetaData InferFromValue(object value, string name) { throw null; }
}
- ///
- [System.AttributeUsage(System.AttributeTargets.Method, AllowMultiple = false, Inherited = false), System.SerializableAttribute]
- public sealed partial class SqlMethodAttribute : SqlFunctionAttribute
- {
- ///
- public SqlMethodAttribute() { }
- ///
- public bool OnNullCall { get { throw null; } set { } }
- ///
- public bool IsMutator { get { throw null; } set { } }
- ///
- public bool InvokeIfReceiverIsNull { get { throw null; } set { } }
- }
- ///
- [System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Struct, AllowMultiple = false, Inherited = false)]
- public sealed partial class SqlUserDefinedAggregateAttribute : System.Attribute
- {
- ///
- public const int MaxByteSizeValue = 8000;
- ///
- public SqlUserDefinedAggregateAttribute(Format format) { }
- ///
- public int MaxByteSize { get { throw null; } set { } }
- ///
- public bool IsInvariantToDuplicates { get { throw null; } set { } }
- ///
- public bool IsInvariantToNulls { get { throw null; } set { } }
- ///
- public bool IsInvariantToOrder { get { throw null; } set { } }
- ///
- public bool IsNullIfEmpty { get { throw null; } set { } }
- ///
- public Format Format { get { throw null; } }
- ///
- public string Name { get { throw null; } set { } }
- }
- ///
- [System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Struct, AllowMultiple = false, Inherited = true)]
- public sealed partial class SqlUserDefinedTypeAttribute : System.Attribute
- {
- ///
- public SqlUserDefinedTypeAttribute(Format format) { }
- ///
- public int MaxByteSize { get { throw null; } set { } }
- ///
- public bool IsFixedLength { get { throw null; } set { } }
- ///
- public bool IsByteOrdered { get { throw null; } set { } }
- ///
- public Format Format { get { throw null; } }
- ///
- public string ValidationMethodName { get { throw null; } set { } }
- ///
- public string Name { get { throw null; } set { } }
- }
- ///
- public enum SystemDataAccessKind
- {
- ///
- None = 0,
- ///
- Read = 1
- }
}
namespace Microsoft.Data.SqlClient.DataClassification
{
diff --git a/src/Microsoft.Data.SqlClient/netfx/src/Microsoft/Data/SqlClient/SqlConnection.cs b/src/Microsoft.Data.SqlClient/netfx/src/Microsoft/Data/SqlClient/SqlConnection.cs
index ae1c8d50db..04acfcb612 100644
--- a/src/Microsoft.Data.SqlClient/netfx/src/Microsoft/Data/SqlClient/SqlConnection.cs
+++ b/src/Microsoft.Data.SqlClient/netfx/src/Microsoft/Data/SqlClient/SqlConnection.cs
@@ -26,7 +26,7 @@
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Data.ProviderBase;
-using Microsoft.Data.SqlClient.Server;
+using Microsoft.SqlServer.Server;
[assembly: InternalsVisibleTo("System.Data.DataSetExtensions, PublicKey=" + Microsoft.Data.SqlClient.AssemblyRef.EcmaPublicKeyFull)] // DevDiv Bugs 92166
// NOTE: The current Microsoft.VSDesigner editor attributes are implemented for System.Data.SqlClient, and are not publicly available.
@@ -2956,7 +2956,7 @@ internal object GetUdtValue(object value, SqlMetaDataPriv metaData, bool returnD
MemoryStream stm = new MemoryStream((byte[])value);
- o = SerializationHelperSql9.Deserialize(stm, metaData.udt?.Type);
+ o = Server.SerializationHelperSql9.Deserialize(stm, metaData.udt?.Type);
Debug.Assert(o != null, "object could NOT be created");
return o;
@@ -2965,12 +2965,12 @@ internal object GetUdtValue(object value, SqlMetaDataPriv metaData, bool returnD
internal byte[] GetBytes(object o)
{
- Microsoft.SqlServer.Server.Format format = Microsoft.SqlServer.Server.Format.Native;
+ Format format = Format.Native;
int maxSize = 0;
return GetBytes(o, out format, out maxSize);
}
- internal byte[] GetBytes(object o, out Microsoft.SqlServer.Server.Format format, out int maxSize)
+ internal byte[] GetBytes(object o, out Format format, out int maxSize)
{
SqlUdtInfo attr = AssemblyCache.GetInfoFromType(o.GetType());
maxSize = attr.MaxByteSize;
@@ -2985,7 +2985,7 @@ internal byte[] GetBytes(object o, out Microsoft.SqlServer.Server.Format format,
using (MemoryStream stm = new MemoryStream(maxSize < 0 ? 0 : maxSize))
{
- SerializationHelperSql9.Serialize(stm, o);
+ Server.SerializationHelperSql9.Serialize(stm, o);
retval = stm.ToArray();
}
return retval;
diff --git a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/Common/AdapterUtil.cs b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/Common/AdapterUtil.cs
index c5ae9853df..1866aa7fb3 100644
--- a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/Common/AdapterUtil.cs
+++ b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/Common/AdapterUtil.cs
@@ -11,9 +11,7 @@
using System.Globalization;
using System.IO;
using System.Runtime.CompilerServices;
-using System.Runtime.ConstrainedExecution;
-using System.Runtime.InteropServices;
-using System.Runtime.Versioning;
+
using System.Security;
using System.Security.Permissions;
using System.Text;
@@ -21,15 +19,16 @@
using System.Threading.Tasks;
using System.Transactions;
using Microsoft.Data.SqlClient;
-using Microsoft.Win32;
using IsolationLevel = System.Data.IsolationLevel;
using Microsoft.Identity.Client;
+using Microsoft.SqlServer.Server;
#if NETFRAMEWORK
-using Microsoft.SqlServer.Server;
+using Microsoft.Win32;
using System.Reflection;
-#else
-using Microsoft.Data.SqlClient.Server;
+using System.Runtime.ConstrainedExecution;
+using System.Runtime.InteropServices;
+using System.Runtime.Versioning;
#endif
namespace Microsoft.Data.Common
diff --git a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/Server/IBinarySerialize.cs b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/Server/IBinarySerialize.cs
deleted file mode 100644
index 9b08f58d39..0000000000
--- a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/Server/IBinarySerialize.cs
+++ /dev/null
@@ -1,21 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-using System.IO;
-
-namespace Microsoft.Data.SqlClient.Server
-{
- ///
- // This interface is used by types that want full control over the
- // binary serialization format.
- public interface IBinarySerialize
- {
- ///
- // Read from the specified binary reader.
- void Read(BinaryReader r);
- ///
- // Write to the specified binary writer.
- void Write(BinaryWriter w);
- }
-}
diff --git a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/Server/InvalidUdtException.cs b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/Server/InvalidUdtException.cs
deleted file mode 100644
index 8a82a0868f..0000000000
--- a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/Server/InvalidUdtException.cs
+++ /dev/null
@@ -1,52 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-using System;
-using System.Runtime.Serialization;
-using Microsoft.Data.Common;
-
-namespace Microsoft.Data.SqlClient.Server
-{
- ///
- [Serializable]
- public sealed class InvalidUdtException : SystemException
- {
- private const int InvalidUdtHResult = unchecked((int)0x80131937);
-
- internal InvalidUdtException() : base()
- {
- HResult = InvalidUdtHResult;
- }
-
- internal InvalidUdtException(string message) : base(message)
- {
- HResult = InvalidUdtHResult;
- }
-
- internal InvalidUdtException(string message, Exception innerException) : base(message, innerException)
- {
- HResult = InvalidUdtHResult;
- }
-
- private InvalidUdtException(SerializationInfo si, StreamingContext sc) : base(si, sc)
- {
- }
-
- ///
- [System.Security.Permissions.SecurityPermissionAttribute(System.Security.Permissions.SecurityAction.LinkDemand, Flags = System.Security.Permissions.SecurityPermissionFlag.SerializationFormatter)]
- public override void GetObjectData(SerializationInfo si, StreamingContext context)
- {
- base.GetObjectData(si, context);
- }
-
- internal static InvalidUdtException Create(Type udtType, string resourceReason)
- {
- string reason = StringsHelper.GetString(resourceReason);
- string message = StringsHelper.GetString(Strings.SqlUdt_InvalidUdtMessage, udtType.FullName, reason);
- InvalidUdtException e = new InvalidUdtException(message);
- ADP.TraceExceptionAsReturnValue(e);
- return e;
- }
- }
-}
diff --git a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/Server/SqlFacetAttribute.cs b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/Server/SqlFacetAttribute.cs
deleted file mode 100644
index da80e953b8..0000000000
--- a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/Server/SqlFacetAttribute.cs
+++ /dev/null
@@ -1,51 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-using System;
-
-namespace Microsoft.Data.SqlClient.Server
-{
- ///
- [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property | AttributeTargets.ReturnValue | AttributeTargets.Parameter, AllowMultiple = false, Inherited = false)]
- public class SqlFacetAttribute : Attribute
- {
- ///
- public SqlFacetAttribute() { }
-
- ///
- public bool IsFixedLength
- {
- get;
- set;
- }
-
- ///
- public int MaxSize
- {
- get;
- set;
- }
-
- ///
- public int Precision
- {
- get;
- set;
- }
-
- ///
- public int Scale
- {
- get;
- set;
- }
-
- ///
- public bool IsNullable
- {
- get;
- set;
- }
- }
-}
diff --git a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/Server/SqlFunctionAttribute.cs b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/Server/SqlFunctionAttribute.cs
deleted file mode 100644
index 87b84c7ba1..0000000000
--- a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/Server/SqlFunctionAttribute.cs
+++ /dev/null
@@ -1,104 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-using System;
-
-namespace Microsoft.Data.SqlClient.Server
-{
- ///
- [Serializable]
- public enum DataAccessKind
- {
- ///
- None = 0,
- ///
- Read = 1,
- }
-
- ///
- [Serializable]
- public enum SystemDataAccessKind
- {
- ///
- None = 0,
- ///
- Read = 1,
- }
-
- ///
- // sql specific attribute
- [AttributeUsage(AttributeTargets.Method, AllowMultiple = false, Inherited = false), Serializable]
- public class SqlFunctionAttribute : Attribute
- {
- private bool _isDeterministic;
- private DataAccessKind _dataAccess;
- private SystemDataAccessKind _systemDataAccess;
- private bool _isPrecise;
- private string _name;
- private string _tableDefinition;
- private string _fillRowMethodName;
-
- ///
- public SqlFunctionAttribute()
- {
- // default values
- _isDeterministic = false;
- _dataAccess = DataAccessKind.None;
- _systemDataAccess = SystemDataAccessKind.None;
- _isPrecise = false;
- _name = null;
- _tableDefinition = null;
- _fillRowMethodName = null;
- }
-
- ///
- public bool IsDeterministic
- {
- get => _isDeterministic;
- set => _isDeterministic = value;
- }
-
- ///
- public DataAccessKind DataAccess
- {
- get => _dataAccess;
- set => _dataAccess = value;
- }
-
- ///
- public SystemDataAccessKind SystemDataAccess
- {
- get => _systemDataAccess;
- set => _systemDataAccess = value;
- }
-
- ///
- public bool IsPrecise
- {
- get => _isPrecise;
- set => _isPrecise = value;
- }
-
- ///
- public string Name
- {
- get => _name;
- set => _name = value;
- }
-
- ///
- public string TableDefinition
- {
- get => _tableDefinition;
- set => _tableDefinition = value;
- }
-
- ///
- public string FillRowMethodName
- {
- get => _fillRowMethodName;
- set => _fillRowMethodName = value;
- }
- }
-}
diff --git a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/Server/SqlMethodAttribute.cs b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/Server/SqlMethodAttribute.cs
deleted file mode 100644
index 4b29c6df55..0000000000
--- a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/Server/SqlMethodAttribute.cs
+++ /dev/null
@@ -1,47 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-using System;
-
-namespace Microsoft.Data.SqlClient.Server
-{
- ///
- [AttributeUsage(AttributeTargets.Method, AllowMultiple = false, Inherited = false), Serializable]
- public sealed class SqlMethodAttribute : SqlFunctionAttribute
- {
- private bool _isCalledOnNullInputs;
- private bool _isMutator;
- private bool _shouldInvokeIfReceiverIsNull;
-
- ///
- public SqlMethodAttribute()
- {
- // default values
- _isCalledOnNullInputs = true;
- _isMutator = false;
- _shouldInvokeIfReceiverIsNull = false;
- }
-
- ///
- public bool OnNullCall
- {
- get => _isCalledOnNullInputs;
- set => _isCalledOnNullInputs = value;
- }
-
- ///
- public bool IsMutator
- {
- get => _isMutator;
- set => _isMutator = value;
- }
-
- ///
- public bool InvokeIfReceiverIsNull
- {
- get => _shouldInvokeIfReceiverIsNull;
- set => _shouldInvokeIfReceiverIsNull = value;
- }
- }
-}
diff --git a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/Server/SqlSer.cs b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/Server/SqlSer.cs
index 9af5e5ef86..1f9a4181f0 100644
--- a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/Server/SqlSer.cs
+++ b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/Server/SqlSer.cs
@@ -7,9 +7,7 @@
using System.IO;
using System.Runtime.CompilerServices;
using Microsoft.Data.Common;
-#if NETFRAMEWORK
using Microsoft.SqlServer.Server;
-#endif
namespace Microsoft.Data.SqlClient.Server
{
diff --git a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/Server/SqlUserDefinedAggregateAttribute.cs b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/Server/SqlUserDefinedAggregateAttribute.cs
deleted file mode 100644
index 861cc8cef0..0000000000
--- a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/Server/SqlUserDefinedAggregateAttribute.cs
+++ /dev/null
@@ -1,134 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-using System;
-using Microsoft.Data.Common;
-
-namespace Microsoft.Data.SqlClient.Server
-{
- ///
- [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct, AllowMultiple = false, Inherited = false)]
- public sealed class SqlUserDefinedAggregateAttribute : Attribute
- {
- private int _maxByteSize;
- private bool _isInvariantToDup;
- private bool _isInvariantToNulls;
- private bool _isInvariantToOrder = true;
- private bool _isNullIfEmpty;
- private Format _format;
- private string _name;
-
- ///
- // The maximum value for the maxbytesize field, in bytes.
- public const int MaxByteSizeValue = 8000;
-
- ///
- // A required attribute on all UD Aggs, used to indicate that the
- // given type is a UD Agg, and its storage format.
- public SqlUserDefinedAggregateAttribute(Format format)
- {
- switch (format)
- {
- case Format.Unknown:
- throw ADP.NotSupportedUserDefinedTypeSerializationFormat(format, nameof(format));
- case Format.Native:
- case Format.UserDefined:
- _format = format;
- break;
- default:
- throw ADP.InvalidUserDefinedTypeSerializationFormat(format);
- }
- }
-
- ///
- // The maximum size of this instance, in bytes. Does not have to be
- // specified for Native format serialization. The maximum value
- // for this property is specified by MaxByteSizeValue.
- public int MaxByteSize
- {
- get
- {
- return _maxByteSize;
- }
- set
- {
- // MaxByteSize of -1 means 2GB and is valid, as well as 0 to MaxByteSizeValue
- if (value < -1 || value > MaxByteSizeValue)
- {
- throw ADP.ArgumentOutOfRange(StringsHelper.GetString(Strings.SQLUDT_MaxByteSizeValue), nameof(MaxByteSize), value);
- }
- _maxByteSize = value;
- }
- }
-
- ///
- public bool IsInvariantToDuplicates
- {
- get
- {
- return _isInvariantToDup;
- }
- set
- {
- _isInvariantToDup = value;
- }
- }
-
- ///
- public bool IsInvariantToNulls
- {
- get
- {
- return _isInvariantToNulls;
- }
- set
- {
- _isInvariantToNulls = value;
- }
- }
-
- ///
- public bool IsInvariantToOrder
- {
- get
- {
- return _isInvariantToOrder;
- }
- set
- {
- _isInvariantToOrder = value;
- }
- }
-
- ///
- public bool IsNullIfEmpty
- {
- get
- {
- return _isNullIfEmpty;
- }
- set
- {
- _isNullIfEmpty = value;
- }
- }
-
- ///
- // The on-disk format for this type.
- public Format Format => _format;
-
- ///
- public string Name
- {
- get
- {
- return _name;
- }
- set
- {
- _name = value;
- }
- }
- }
-}
diff --git a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/Server/SqlUserDefinedTypeAttribute.cs b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/Server/SqlUserDefinedTypeAttribute.cs
deleted file mode 100644
index 1a399d2749..0000000000
--- a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/Server/SqlUserDefinedTypeAttribute.cs
+++ /dev/null
@@ -1,140 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-using System;
-using Microsoft.Data.Common;
-
-namespace Microsoft.Data.SqlClient.Server
-{
- ///
- public enum Format
- {
- ///
- Unknown = 0,
- ///
- Native = 1,
- ///
- UserDefined = 2,
- }
-
- ///
- // This custom attribute indicates that the given type is
- // a SqlServer udt. The properties on the attribute reflect the
- // physical attributes that will be used when the type is registered
- // with SqlServer.
- [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct, AllowMultiple = false, Inherited = true)]
- public sealed class SqlUserDefinedTypeAttribute : Attribute
- {
- private int _maxByteSize;
- private bool _isFixedLength;
- private bool _isByteOrdered;
- private Format _format;
- private string _name;
-
- // The maximum value for the maxbytesize field, in bytes.
- internal const int Sql2005MaxByteSizeValue = 8000;
- private string _validationMethodName = null;
-
- ///
- // A required attribute on all udts, used to indicate that the
- // given type is a udt, and its storage format.
- public SqlUserDefinedTypeAttribute(Format format)
- {
- switch (format)
- {
- case Format.Unknown:
- throw ADP.NotSupportedUserDefinedTypeSerializationFormat(format, nameof(format));
- case Format.Native:
- case Format.UserDefined:
- _format = format;
- break;
- default:
- throw ADP.InvalidUserDefinedTypeSerializationFormat(format);
- }
- }
-
- ///
- // The maximum size of this instance, in bytes. Does not have to be
- // specified for Native serialization. The maximum value
- // for this property is specified by MaxByteSizeValue.
- public int MaxByteSize
- {
- get
- {
- return _maxByteSize;
- }
- set
- {
- if (value < -1)
- {
- throw ADP.ArgumentOutOfRange(nameof(MaxByteSize));
- }
- _maxByteSize = value;
- }
- }
-
- ///
- // Are all instances of this udt the same size on disk?
- public bool IsFixedLength
- {
- get
- {
- return _isFixedLength;
- }
- set
- {
- _isFixedLength = value;
- }
- }
-
- ///
- // Is this type byte ordered, i.e. is the on disk representation
- // consistent with the ordering semantics for this type?
- // If true, the binary representation of the type will be used
- // in comparison by SqlServer. This property enables indexing on the
- // udt and faster comparisons.
- public bool IsByteOrdered
- {
- get
- {
- return _isByteOrdered;
- }
- set
- {
- _isByteOrdered = value;
- }
- }
-
- ///
- // The on-disk format for this type.
- public Format Format => _format;
-
- ///
- // An Optional method used to validate this UDT
- public string ValidationMethodName
- {
- get
- {
- return _validationMethodName;
- }
- set
- {
- _validationMethodName = value;
- }
- }
-
- ///
- public string Name
- {
- get
- {
- return _name;
- }
- set
- {
- _name = value;
- }
- }
- }
-}
diff --git a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlEnums.cs b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlEnums.cs
index a498ddc54d..bb474a0465 100644
--- a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlEnums.cs
+++ b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlEnums.cs
@@ -15,10 +15,7 @@
using System.IO;
using System.Xml;
using Microsoft.Data.Common;
-using Microsoft.Data.SqlClient.Server;
-#if NETFRAMEWORK
using Microsoft.SqlServer.Server;
-#endif
namespace Microsoft.Data.SqlClient
{
diff --git a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlUdtInfo.cs b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlUdtInfo.cs
index c15808bc8a..4ac81a9844 100644
--- a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlUdtInfo.cs
+++ b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlUdtInfo.cs
@@ -5,11 +5,7 @@
using System;
using System.Collections.Generic;
using Microsoft.Data.Common;
-#if NETFRAMEWORK
using Microsoft.SqlServer.Server;
-#else
-using Microsoft.Data.SqlClient.Server;
-#endif
namespace Microsoft.Data.SqlClient
{
diff --git a/src/Microsoft.Data.SqlClient/tests/FunctionalTests/Microsoft.Data.SqlClient.Tests.csproj b/src/Microsoft.Data.SqlClient/tests/FunctionalTests/Microsoft.Data.SqlClient.Tests.csproj
index 721d8a5c91..5b1ec82808 100644
--- a/src/Microsoft.Data.SqlClient/tests/FunctionalTests/Microsoft.Data.SqlClient.Tests.csproj
+++ b/src/Microsoft.Data.SqlClient/tests/FunctionalTests/Microsoft.Data.SqlClient.Tests.csproj
@@ -97,6 +97,7 @@
+
diff --git a/src/Microsoft.Data.SqlClient/tests/FunctionalTests/SqlDataRecordTest.cs b/src/Microsoft.Data.SqlClient/tests/FunctionalTests/SqlDataRecordTest.cs
index 99bfc55140..77546de525 100644
--- a/src/Microsoft.Data.SqlClient/tests/FunctionalTests/SqlDataRecordTest.cs
+++ b/src/Microsoft.Data.SqlClient/tests/FunctionalTests/SqlDataRecordTest.cs
@@ -390,10 +390,6 @@ IEnumerator IEnumerable.GetEnumerator()
return GetEnumerator();
}
}
-#if NETFRAMEWORK
[SqlServer.Server.SqlUserDefinedType(SqlServer.Server.Format.UserDefined)]
-#else
- [SqlUserDefinedType(Format.UserDefined)]
-#endif
public class TestUdt {}
}
diff --git a/src/Microsoft.Data.SqlClient/tests/FunctionalTests/SqlFacetAttributeTest.cs b/src/Microsoft.Data.SqlClient/tests/FunctionalTests/SqlFacetAttributeTest.cs
index d37e20667d..d57cf853e9 100644
--- a/src/Microsoft.Data.SqlClient/tests/FunctionalTests/SqlFacetAttributeTest.cs
+++ b/src/Microsoft.Data.SqlClient/tests/FunctionalTests/SqlFacetAttributeTest.cs
@@ -2,11 +2,7 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#if NETFRAMEWORK
using Microsoft.SqlServer.Server;
-#else
-using Microsoft.Data.SqlClient.Server;
-#endif
using Xunit;
namespace Microsoft.Data.SqlClient.Tests
diff --git a/src/Microsoft.Data.SqlClient/tests/FunctionalTests/SqlMetaDataTest.cs b/src/Microsoft.Data.SqlClient/tests/FunctionalTests/SqlMetaDataTest.cs
index 8d3c46b75a..a9123e1582 100644
--- a/src/Microsoft.Data.SqlClient/tests/FunctionalTests/SqlMetaDataTest.cs
+++ b/src/Microsoft.Data.SqlClient/tests/FunctionalTests/SqlMetaDataTest.cs
@@ -511,6 +511,11 @@ public void DecimalConstructorWithPrecisionOutofRange2_Throws()
[InlineData(SqlDbType.Udt, typeof(Address))]
public void GenericConstructorWithoutXmlSchema(SqlDbType dbType, Type udt)
{
+ if (udt != null)
+ {
+ Type t = udt.GetInterface("IBinarySerialize", true);
+ Assert.Equal(typeof(Microsoft.SqlServer.Server.IBinarySerialize), t);
+ }
SqlMetaData metaData = new SqlMetaData("col2", dbType, 16, 2, 2, 2, SqlCompareOptions.IgnoreCase, udt, true, true, SortOrder.Ascending, 0);
Assert.Equal(dbType, metaData.SqlDbType);
Assert.True(metaData.UseServerDefault);
@@ -715,14 +720,10 @@ public void UdtConstructorTest()
[Fact]
public static void InvalidUdtEcxeption_Throws()
{
- var e = Assert.Throws
-#if NETFRAMEWORK
-
-#else
-
-#endif
- (() => new SqlMetaData("col1", SqlDbType.Udt, typeof(int), "UdtTestDb.dbo.Address"));
- Assert.Equal("'System.Int32' is an invalid user defined type, reason: no UDT attribute.", e.Message);
+ SqlServer.Server.InvalidUdtException e =
+ Assert.Throws (() => new SqlMetaData("col1", SqlDbType.Udt, typeof(int), "UdtTestDb.dbo.Address"));
+
+ Assert.Equal("'System.Int32' is an invalid user defined type, reason: no UDT attribute.", e.Message);
}
[Fact]
diff --git a/src/Microsoft.Data.SqlClient/tests/ManualTests/Microsoft.Data.SqlClient.ManualTesting.Tests.csproj b/src/Microsoft.Data.SqlClient/tests/ManualTests/Microsoft.Data.SqlClient.ManualTesting.Tests.csproj
index 48288c80ca..aef505ed1b 100644
--- a/src/Microsoft.Data.SqlClient/tests/ManualTests/Microsoft.Data.SqlClient.ManualTesting.Tests.csproj
+++ b/src/Microsoft.Data.SqlClient/tests/ManualTests/Microsoft.Data.SqlClient.ManualTesting.Tests.csproj
@@ -302,6 +302,7 @@
+
@@ -320,7 +321,6 @@
-
diff --git a/src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/UdtTest/UDTs/Address/Address.cs b/src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/UdtTest/UDTs/Address/Address.cs
index 01057ebb2e..ed1e683002 100644
--- a/src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/UdtTest/UDTs/Address/Address.cs
+++ b/src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/UdtTest/UDTs/Address/Address.cs
@@ -5,11 +5,7 @@
using System;
using System.Data.SqlTypes;
using System.IO;
-#if NETFRAMEWORK
using Microsoft.SqlServer.Server;
-#else
-using Microsoft.Data.SqlClient.Server;
-#endif
[Serializable]
[SqlUserDefinedType(Format.UserDefined, IsByteOrdered = false, MaxByteSize = 500)]
diff --git a/src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/UdtTest/UDTs/Address/Address.csproj b/src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/UdtTest/UDTs/Address/Address.csproj
index 5fcf9a6d08..350733ed9b 100644
--- a/src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/UdtTest/UDTs/Address/Address.csproj
+++ b/src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/UdtTest/UDTs/Address/Address.csproj
@@ -12,6 +12,7 @@
+
-
\ No newline at end of file
+
diff --git a/src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/UdtTest/UDTs/Circle/Circle.cs b/src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/UdtTest/UDTs/Circle/Circle.cs
index 0964e14847..e44f8d3abe 100644
--- a/src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/UdtTest/UDTs/Circle/Circle.cs
+++ b/src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/UdtTest/UDTs/Circle/Circle.cs
@@ -6,11 +6,7 @@
using System.Data.SqlTypes;
using System.IO;
using System.Text;
-#if NETFRAMEWORK
using Microsoft.SqlServer.Server;
-#else
-using Microsoft.Data.SqlClient.Server;
-#endif
[Serializable]
[SqlUserDefinedType(Format.UserDefined, IsByteOrdered = false, MaxByteSize = 30)]
diff --git a/src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/UdtTest/UDTs/Circle/Circle.csproj b/src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/UdtTest/UDTs/Circle/Circle.csproj
index 5b0d1542d3..5f61786bb3 100644
--- a/src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/UdtTest/UDTs/Circle/Circle.csproj
+++ b/src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/UdtTest/UDTs/Circle/Circle.csproj
@@ -12,6 +12,7 @@
+
-
\ No newline at end of file
+
diff --git a/src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/UdtTest/UDTs/Circle/Point1.cs b/src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/UdtTest/UDTs/Circle/Point1.cs
index 5392e57818..7ccc5c6d4b 100644
--- a/src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/UdtTest/UDTs/Circle/Point1.cs
+++ b/src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/UdtTest/UDTs/Circle/Point1.cs
@@ -6,11 +6,7 @@
using System.Data.SqlTypes;
using System.IO;
using System.Text;
-#if NETFRAMEWORK
using Microsoft.SqlServer.Server;
-#else
-using Microsoft.Data.SqlClient.Server;
-#endif
[Serializable]
[SqlUserDefinedType(Format.UserDefined, IsByteOrdered = true, MaxByteSize = 9)]
diff --git a/src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/UdtTest/UDTs/Shapes/Line.cs b/src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/UdtTest/UDTs/Shapes/Line.cs
index addc6e266f..d6efa7ddf5 100644
--- a/src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/UdtTest/UDTs/Shapes/Line.cs
+++ b/src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/UdtTest/UDTs/Shapes/Line.cs
@@ -6,11 +6,7 @@
using System.Data.SqlTypes;
using System.IO;
using System.Text;
-#if NETFRAMEWORK
using Microsoft.SqlServer.Server;
-#else
-using Microsoft.Data.SqlClient.Server;
-#endif
[Serializable]
[SqlUserDefinedType(Format.UserDefined, IsByteOrdered = false, MaxByteSize = 20)]
diff --git a/src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/UdtTest/UDTs/Shapes/Point.cs b/src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/UdtTest/UDTs/Shapes/Point.cs
index b1b7a4ea7f..2dbf5e510c 100644
--- a/src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/UdtTest/UDTs/Shapes/Point.cs
+++ b/src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/UdtTest/UDTs/Shapes/Point.cs
@@ -6,11 +6,7 @@
using System.Data.SqlTypes;
using System.IO;
using System.Text;
-#if NETFRAMEWORK
using Microsoft.SqlServer.Server;
-#else
-using Microsoft.Data.SqlClient.Server;
-#endif
[Serializable]
[SqlUserDefinedType(Format.UserDefined, IsByteOrdered = true, MaxByteSize = 9)]
diff --git a/src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/UdtTest/UDTs/Shapes/Shapes.csproj b/src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/UdtTest/UDTs/Shapes/Shapes.csproj
index b2394ad310..e0ea118c00 100644
--- a/src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/UdtTest/UDTs/Shapes/Shapes.csproj
+++ b/src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/UdtTest/UDTs/Shapes/Shapes.csproj
@@ -12,6 +12,7 @@
+
-
\ No newline at end of file
+
diff --git a/src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/UdtTest/UDTs/Utf8String/Utf8String.cs b/src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/UdtTest/UDTs/Utf8String/Utf8String.cs
index 4bba8c88ba..e026674602 100644
--- a/src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/UdtTest/UDTs/Utf8String/Utf8String.cs
+++ b/src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/UdtTest/UDTs/Utf8String/Utf8String.cs
@@ -5,11 +5,7 @@
using System;
using System.Data.SqlTypes;
using System.Globalization;
-#if NETFRAMEWORK
using Microsoft.SqlServer.Server;
-#else
-using Microsoft.Data.SqlClient.Server;
-#endif
namespace Microsoft.Samples.SqlServer
{
diff --git a/src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/UdtTest/UDTs/Utf8String/Utf8String.csproj b/src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/UdtTest/UDTs/Utf8String/Utf8String.csproj
index bf3da8f47a..5e8ce85bd4 100644
--- a/src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/UdtTest/UDTs/Utf8String/Utf8String.csproj
+++ b/src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/UdtTest/UDTs/Utf8String/Utf8String.csproj
@@ -12,6 +12,7 @@
+
-
\ No newline at end of file
+
diff --git a/src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/UdtTest/UdtTest2.cs b/src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/UdtTest/UdtTest2.cs
index e0e30dd2e5..1f07242ee3 100644
--- a/src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/UdtTest/UdtTest2.cs
+++ b/src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/UdtTest/UdtTest2.cs
@@ -6,12 +6,8 @@
using System.Data;
using System.Data.SqlTypes;
using System.Text;
-#if NETFRAMEWORK
-using Microsoft.SqlServer.Server;
-#else
-using Microsoft.Data.SqlClient.Server;
-#endif
using Xunit;
+using Microsoft.SqlServer.Server;
namespace Microsoft.Data.SqlClient.ManualTesting.Tests
{
@@ -574,7 +570,7 @@ public void TestSchemaTable()
public void TestSqlUserDefinedAggregateAttributeMaxByteSize()
{
Func create
- = (size) => new SqlUserDefinedAggregateAttribute(Format.UserDefined) { MaxByteSize = size };
+ = (size) => new(Format.UserDefined) { MaxByteSize = size };
SqlUserDefinedAggregateAttribute attribute1 = create(-1);
SqlUserDefinedAggregateAttribute attribute2 = create(0);
diff --git a/tools/props/Versions.props b/tools/props/Versions.props
index 95122fdfc6..1aa6b58178 100644
--- a/tools/props/Versions.props
+++ b/tools/props/Versions.props
@@ -64,7 +64,6 @@
3.1.15.2.615.9.0
- 3.1.013.0.14.3.04.3.0
diff --git a/tools/specs/Microsoft.Data.SqlClient.nuspec b/tools/specs/Microsoft.Data.SqlClient.nuspec
index 2759aafe6c..ea863b6f83 100644
--- a/tools/specs/Microsoft.Data.SqlClient.nuspec
+++ b/tools/specs/Microsoft.Data.SqlClient.nuspec
@@ -47,6 +47,7 @@ When using NuGet 3.x this package requires at least version 3.4.
+
@@ -65,6 +66,7 @@ When using NuGet 3.x this package requires at least version 3.4.
+
@@ -83,6 +85,7 @@ When using NuGet 3.x this package requires at least version 3.4.
+