Feature | Project Microsoft.SqlServer.Server separation phase 2 (MDS consumes MSS using netcore) (#1585)
This commit is contained in:
Родитель
73eba15c54
Коммит
d600f8921e
|
@ -71,7 +71,7 @@
|
|||
<Target Name="BuildAll" DependsOnTargets="BuildSqlServerLib;BuildNetFx;BuildNetCore" />
|
||||
<Target Name="BuildAllConfigurations" DependsOnTargets="Restore;BuildTools;BuildSqlServerLib;BuildNetFx;BuildNetCoreAllOS;GenerateNugetPackage" />
|
||||
<Target Name="BuildSqlServerPackage" DependsOnTargets="BuildSqlServerLibAnyOS;GenerateSqlServerPackage"/>
|
||||
<Target Name="BuildTestsNetCore" DependsOnTargets="RestoreTestsNetCore;BuildAKVNetCore;BuildFunctionalTestsNetCore;BuildManualTestsNetCore"/>
|
||||
<Target Name="BuildTestsNetCore" DependsOnTargets="BuildSqlServerLib;RestoreTestsNetCore;BuildAKVNetCore;BuildFunctionalTestsNetCore;BuildManualTestsNetCore"/>
|
||||
<Target Name="BuildTestsNetFx" DependsOnTargets="BuildSqlServerLib;RestoreTestsNetFx;BuildAKVNetFx;BuildFunctionalTestsNetFx;BuildManualTestsNetFx" Condition="$(IsEnabledWindows) == 'true'"/>
|
||||
<Target Name="BuildTests" DependsOnTargets="BuildTestsNetCore;BuildTestsNetFx"/>
|
||||
|
||||
|
@ -113,7 +113,9 @@
|
|||
</Target>
|
||||
|
||||
<Target Name="BuildSqlServerLib" DependsOnTargets="RestoreSqlServerLib">
|
||||
<!-- Only build platform specific builds for Package reference types -->
|
||||
<MSBuild Projects="@(SqlServerLib)" Properties="$(CI);$(SqlServerLibProperties);Platform=AnyCPU;" RemoveProperties="TargetsWindows;TargetsUnix;" />
|
||||
<MSBuild Projects="@(SqlServerLib)" Properties="$(CI);$(SqlServerLibProperties);Platform=$(Platform);" Condition="$(ReferenceType.Contains('Package'))"/>
|
||||
</Target>
|
||||
|
||||
<Target Name="BuildNetCore" DependsOnTargets="RestoreNetCore">
|
||||
|
|
|
@ -2,7 +2,7 @@ using System;
|
|||
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 @@ namespace test
|
|||
// 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 @@ namespace test
|
|||
// 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;
|
||||
|
|
|
@ -2,7 +2,7 @@ using System;
|
|||
using System.IO;
|
||||
using System.Collections;
|
||||
//<Snippet1>
|
||||
using Microsoft.Data.SqlClient.Server;
|
||||
using Microsoft.SqlServer.Server;
|
||||
|
||||
public class Class1
|
||||
{
|
||||
|
|
|
@ -1,20 +1,20 @@
|
|||
using System;
|
||||
//<Snippet1>
|
||||
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)
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
//<Snippet5>
|
||||
using System;
|
||||
using System.Data.SqlTypes;
|
||||
using Microsoft.Data.SqlClient.Server;
|
||||
using Microsoft.SqlServer.Server;
|
||||
|
||||
[Serializable()]
|
||||
[SqlUserDefinedType(Format.Native)]
|
||||
|
@ -133,7 +133,7 @@ public struct Point : INullable
|
|||
|
||||
//-----------------------------------------------------------------------------
|
||||
//<Snippet12>
|
||||
// using Microsoft.Data.SqlClient.Server;
|
||||
// using Microsoft.SqlServer.Server;
|
||||
|
||||
[SqlUserDefinedType(Format.Native, MaxByteSize = 8000)]
|
||||
public class SampleType
|
||||
|
|
|
@ -1,26 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
<docs>
|
||||
<members name="DataAccessKind">
|
||||
<DataAccessKind>
|
||||
<summary>Describes the type of access to user data for a user-defined method or function.</summary>
|
||||
<remarks>
|
||||
<format type="text/markdown"><![CDATA[
|
||||
|
||||
## Remarks
|
||||
Describes the type of access to user data for a user-defined method or function.
|
||||
|
||||
This enumeration is used in <xref:Microsoft.Data.SqlClient.Server.SqlMethodAttribute> and <xref:Microsoft.Data.SqlClient.Server.SqlFunctionAttribute> 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).
|
||||
|
||||
]]></format>
|
||||
</remarks>
|
||||
</DataAccessKind>
|
||||
<None>
|
||||
<summary>The method or function does not access user data.</summary>
|
||||
</None>
|
||||
<Read>
|
||||
<summary>The method or function reads user data.</summary>
|
||||
</Read>
|
||||
</members>
|
||||
</docs>
|
|
@ -1,51 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
<docs>
|
||||
<members name="Format">
|
||||
<Format>
|
||||
<summary>Used by <see cref="T:Microsoft.Data.SqlClient.Server.SqlUserDefinedTypeAttribute" /> and <see cref="T:Microsoft.Data.SqlClient.Server.SqlUserDefinedAggregateAttribute" /> to indicate the serialization format of a user-defined type (UDT) or aggregate.</summary>
|
||||
<remarks>
|
||||
<format type="text/markdown"><![CDATA[
|
||||
|
||||
## Remarks
|
||||
This enumeration is used by <xref:Microsoft.Data.SqlClient.Server.SqlUserDefinedTypeAttribute> and <xref:Microsoft.Data.SqlClient.Server.SqlUserDefinedAggregateAttribute> 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 <xref:System.Runtime.InteropServices.StructLayoutAttribute> with a <xref:System.Runtime.InteropServices.StructLayoutAttribute.Value> property value of <xref:System.Runtime.InteropServices.LayoutKind.Sequential?displayProperty=nameWithType> 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`, <xref:System.Data.SqlTypes.SqlByte>, <xref:System.Data.SqlTypes.SqlInt16>, <xref:System.Data.SqlTypes.SqlInt32>, <xref:System.Data.SqlTypes.SqlInt64>, <xref:System.Data.SqlTypes.SqlDateTime>, <xref:System.Data.SqlTypes.SqlSingle>, <xref:System.Data.SqlTypes.SqlDouble>, <xref:System.Data.SqlTypes.SqlMoney>, 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 <xref:System.Runtime.InteropServices.StructLayoutAttribute.Value?displayProperty=nameWithType> of <xref:System.Runtime.InteropServices.LayoutKind.Explicit?displayProperty=nameWithType>).
|
||||
- `Format.UserDefined`
|
||||
The requirements for the `Format.UserDefined` format are:
|
||||
- The aggregate must specify a value for `MaxByteSize`.
|
||||
|
||||
- Specify the <xref:Microsoft.Data.SqlClient.Server.SqlUserDefinedTypeAttribute.IsByteOrdered%2A?displayProperty=nameWithType> attribute property. The default value is `false`.
|
||||
|
||||
- If you omit any field in the <xref:Microsoft.Data.SqlClient.Server.IBinarySerialize.Read%2A?displayProperty=nameWithType> or <xref:Microsoft.Data.SqlClient.Server.IBinarySerialize.Write%2A?displayProperty=nameWithType> 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)]
|
||||
|
||||
]]></format>
|
||||
</remarks>
|
||||
</Format>
|
||||
<Native>
|
||||
<summary>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 <see langword="Native" /> 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 <see cref="T:System.String" />), are not supported.</summary>
|
||||
</Native>
|
||||
<Unknown>
|
||||
<summary>The serialization format is unknown.</summary>
|
||||
</Unknown>
|
||||
<UserDefined>
|
||||
<summary>This serialization format gives the developer full control over the binary format through the <see cref="M:Microsoft.Data.SqlClient.Server.IBinarySerialize.Write(System.IO.BinaryWriter)" /> and <see cref="M:Microsoft.Data.SqlClient.Server.IBinarySerialize.Read(System.IO.BinaryReader)" /> methods.</summary>
|
||||
</UserDefined>
|
||||
</members>
|
||||
</docs>
|
|
@ -1,54 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
<docs>
|
||||
<members name="IBinarySerialize">
|
||||
<IBinarySerialize>
|
||||
<summary>Provides custom implementation for user-defined type (UDT) and user-defined aggregate serialization and deserialization.</summary>
|
||||
<remarks>
|
||||
<format type="text/markdown"><![CDATA[
|
||||
|
||||
## Remarks
|
||||
User-defined types (UDTs) and user-defined aggregates are required to define a storage format, which can be either <xref:Microsoft.Data.SqlClient.Server.Format>.`Native` or <xref:Microsoft.Data.SqlClient.Server.Format>.`UserDefined`.
|
||||
|
||||
<xref:Microsoft.Data.SqlClient.Server.Format>.`Native` allows SQL Server to handle serialization and deserialization automatically, but the format has restrictions on the kind of types it can handle. <xref:Microsoft.Data.SqlClient.Server.Format>.`UserDefined` allows user-defined types and aggregates to handle their own serialization. User-defined types and aggregates must be marked with <xref:Microsoft.Data.SqlClient.Server.Format>.`UserDefined` in the `SqlUserDefinedType` or `SqlUserDefinedAggregate` attribute, and must implement the <xref:Microsoft.Data.SqlClient.Server.IBinarySerialize> interface.
|
||||
|
||||
Note that even with custom serialization, the total size of each instance must be under the maximum allowed limit, currently 8000 bytes.
|
||||
|
||||
]]></format>
|
||||
</remarks>
|
||||
</IBinarySerialize>
|
||||
<Read>
|
||||
<param name="r">The <see cref="T:System.IO.BinaryReader" /> stream from which the object is deserialized.</param>
|
||||
<summary>Generates a user-defined type (UDT) or user-defined aggregate from its binary form.</summary>
|
||||
<remarks>
|
||||
<format type="text/markdown"><![CDATA[
|
||||
|
||||
## Remarks
|
||||
The <xref:Microsoft.Data.SqlClient.Server.IBinarySerialize.Read%2A> method must reconstitute your object using the information written by the <xref:Microsoft.Data.SqlClient.Server.IBinarySerialize.Write%2A> method.
|
||||
|
||||
## Examples
|
||||
The following example shows the implementation of the <xref:Microsoft.Data.SqlClient.Server.IBinarySerialize.Read%2A> method of a UDT, which uses a <xref:System.IO.BinaryReader> 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)]
|
||||
|
||||
]]></format>
|
||||
</remarks>
|
||||
</Read>
|
||||
<Write>
|
||||
<param name="w">The <see cref="T:System.IO.BinaryWriter" /> stream to which the UDT or user-defined aggregate is serialized.</param>
|
||||
<summary>Converts a user-defined type (UDT) or user-defined aggregate into its binary format so that it may be persisted.</summary>
|
||||
<remarks>
|
||||
<format type="text/markdown"><![CDATA[
|
||||
|
||||
## Remarks
|
||||
Write sufficient information to the binary stream to allow the <xref:Microsoft.Data.SqlClient.Server.IBinarySerialize.Read%2A> method to reconstitute your UDT or user-defined aggregate.
|
||||
|
||||
## Examples
|
||||
The following example shows the implementation of the <xref:Microsoft.Data.SqlClient.Server.IBinarySerialize.Write%2A> method of a UDT, which uses a <xref:System.IO.BinaryWriter> 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)]
|
||||
|
||||
]]></format>
|
||||
</remarks>
|
||||
</Write>
|
||||
</members>
|
||||
</docs>
|
|
@ -1,22 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
<docs>
|
||||
<members name="InvalidUdtException">
|
||||
<InvalidUdtException>
|
||||
<summary>Thrown when SQL Server or the ADO.NET <see cref="N:Microsoft.Data.SqlClient" /> provider detects an invalid user-defined type (UDT).</summary>
|
||||
<remarks>To be added.</remarks>
|
||||
</InvalidUdtException>
|
||||
<GetObjectData>
|
||||
<param name="si">The <see cref="T:System.Runtime.Serialization.SerializationInfo" /> object.</param>
|
||||
<param name="context">The <see cref="T:System.Runtime.Serialization.StreamingContext" /> object.</param>
|
||||
<summary>Streams all the <see cref="T:Microsoft.Data.SqlClient.Server.InvalidUdtException" /> properties into the <see cref="T:System.Runtime.Serialization.SerializationInfo" /> class for the given <see cref="T:System.Runtime.Serialization.StreamingContext" />.</summary>
|
||||
<remarks>
|
||||
<format type="text/markdown"><![CDATA[
|
||||
|
||||
## Remarks
|
||||
This method is present in the <xref:Microsoft.Data.SqlClient.Server.InvalidUdtException> class to make the class serializable.
|
||||
|
||||
]]></format>
|
||||
</remarks>
|
||||
</GetObjectData>
|
||||
</members>
|
||||
</docs>
|
|
@ -1,124 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
<docs>
|
||||
<members name="SqlFacetAttribute">
|
||||
<SqlFacetAttribute>
|
||||
<summary>Annotates the returned result of a user-defined type (UDT) with additional information that can be used in Transact-SQL.</summary>
|
||||
<remarks>
|
||||
<format type="text/markdown"><![CDATA[
|
||||
|
||||
## Remarks
|
||||
<xref:Microsoft.Data.SqlClient.Server.SqlFacetAttribute> may only be specified on non-void return values.
|
||||
|
||||
<xref:Microsoft.Data.SqlClient.Server.SqlFacetAttribute> 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 <xref:Microsoft.Data.SqlClient.Server.SqlFacetAttribute> 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 <xref:Microsoft.Data.SqlClient.Server.SqlFacetAttribute> 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 <xref:Microsoft.Data.SqlClient.Server.SqlFacetAttribute.Precision%2A> and <xref:Microsoft.Data.SqlClient.Server.SqlFacetAttribute.Scale%2A> properties are 38. For the <xref:Microsoft.Data.SqlClient.Server.SqlFacetAttribute.MaxSize%2A> 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|
|
||||
|----------|-------------------|-------------|---------------|-----------|----------------|
|
||||
|<xref:System.Data.SqlTypes.SqlBoolean>|N|N|N|N|Y|
|
||||
|<xref:System.Data.SqlTypes.SqlByte>|N|N|N|N|Y|
|
||||
|<xref:System.Data.SqlTypes.SqlInt16>|N|N|N|N|Y|
|
||||
|<xref:System.Data.SqlTypes.SqlInt32>|N|N|N|N|Y|
|
||||
|<xref:System.Data.SqlTypes.SqlInt64>|N|N|N|N|Y|
|
||||
|<xref:System.Data.SqlTypes.SqlSingle>|N|N|N|N|Y|
|
||||
|<xref:System.Data.SqlTypes.SqlDouble>|N|N|N|N|Y|
|
||||
|<xref:System.Data.SqlTypes.SqlDateTime>|N|N|N|N|Y|
|
||||
|<xref:System.Data.SqlTypes.SqlMoney>|N|N|N|N|Y|
|
||||
|<xref:System.Data.SqlTypes.SqlGuid>|N|N|N|N|Y|
|
||||
|<xref:System.Data.SqlTypes.SqlDecimal>|N|N|Y|Y|Y|
|
||||
|<xref:System.Data.SqlTypes.SqlString>|Y|Y|N|N|Y|
|
||||
|<xref:System.Data.SqlTypes.SqlBinary>|Y|Y|N|N|Y|
|
||||
|<xref:System.Data.SqlTypes.SqlXml>|N|N|N|N|Y|
|
||||
|<xref:System.Data.SqlTypes.SqlBytes>|Y|Y|N|N|Y|
|
||||
|<xref:System.Data.SqlTypes.SqlChars>|Y|Y|N|N|Y|
|
||||
|Embedded UDTs|N|N|N|N|Y|
|
||||
|<xref:System.String>|Y|Y|N|N|Y|
|
||||
|Byte[]|Y|Y|N|N|Y|
|
||||
|Char[]|Y|Y|N|N|Y|
|
||||
|<xref:System.DateTime>|N|N|N|Y<sup>1</sup>|N|
|
||||
|<xref:System.Decimal>|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.
|
||||
|
||||
]]></format>
|
||||
</remarks>
|
||||
</SqlFacetAttribute>
|
||||
<ctor>
|
||||
<summary>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.</summary>
|
||||
<remarks>To be added.</remarks>
|
||||
</ctor>
|
||||
<IsFixedLength>
|
||||
<summary>Indicates whether the return type of the user-defined type is of a fixed length.</summary>
|
||||
<value>
|
||||
<see langword="true" /> if the return type is of a fixed length; otherwise <see langword="false" />.</value>
|
||||
<remarks>
|
||||
<format type="text/markdown"><![CDATA[
|
||||
## Remarks
|
||||
This property must be set to `false` if the <xref:Microsoft.Data.SqlClient.Server.SqlFacetAttribute.MaxSize%2A> property is set to 1.
|
||||
|
||||
The default value is `false`.
|
||||
|
||||
]]></format>
|
||||
</remarks>
|
||||
</IsFixedLength>
|
||||
<IsNullable>
|
||||
<summary>Indicates whether the return type of the user-defined type can be <see langword="null" />.</summary>
|
||||
<value>
|
||||
<see langword="true" /> if the return type of the user-defined type can be <see langword="null" />; otherwise <see langword="false" />.</value>
|
||||
<remarks>
|
||||
<format type="text/markdown"><![CDATA[
|
||||
|
||||
## Remarks
|
||||
The default value is `true`.
|
||||
|
||||
]]></format>
|
||||
</remarks>
|
||||
</IsNullable>
|
||||
<MaxSize>
|
||||
<summary>The maximum size, in logical units, of the underlying field type of the user-defined type.</summary>
|
||||
<value>An <see cref="T:System.Int32" /> representing the maximum size, in logical units, of the underlying field type.</value>
|
||||
<remarks>
|
||||
<format type="text/markdown"><![CDATA[
|
||||
|
||||
## Remarks
|
||||
Logical unit is bytes (with a maximum size of 8000) for the binary and non-Unicode data types, and the number of Unicode characters (with a maximum size of 4000) for the character field types.
|
||||
|
||||
The value -1 is reserved for large character and binary types.
|
||||
|
||||
The default value is 4000 for Unicode character types and 8000 for binary and non-Unicode types.
|
||||
|
||||
]]></format>
|
||||
</remarks>
|
||||
</MaxSize>
|
||||
<Precision>
|
||||
<summary>The precision of the return type of the user-defined type.</summary>
|
||||
<value>An <see cref="T:System.Int32" /> representing the precision of the return type.</value>
|
||||
<remarks>
|
||||
<format type="text/markdown"><![CDATA[
|
||||
|
||||
## Remarks
|
||||
The <xref:Microsoft.Data.SqlClient.Server.SqlFacetAttribute.Precision%2A> property is valid only for numeric types. The <xref:Microsoft.Data.SqlClient.Server.SqlFacetAttribute.Scale%2A> property must also be specified when setting the <xref:Microsoft.Data.SqlClient.Server.SqlFacetAttribute.Precision%2A> property.
|
||||
|
||||
The maximum value of the <xref:Microsoft.Data.SqlClient.Server.SqlFacetAttribute.Precision%2A> property is 38; the default value is 38.
|
||||
|
||||
]]></format>
|
||||
</remarks>
|
||||
</Precision>
|
||||
<Scale>
|
||||
<summary>The scale of the return type of the user-defined type.</summary>
|
||||
<value>An <see cref="T:System.Int32" /> representing the scale of the return type.</value>
|
||||
<remarks>
|
||||
<format type="text/markdown"><![CDATA[
|
||||
|
||||
## Remarks
|
||||
The <xref:Microsoft.Data.SqlClient.Server.SqlFacetAttribute.Scale%2A> property is valid only for decimal types. The <xref:Microsoft.Data.SqlClient.Server.SqlFacetAttribute.Precision%2A> property must also be specified when setting the <xref:Microsoft.Data.SqlClient.Server.SqlFacetAttribute.Scale%2A> property.
|
||||
|
||||
The maximum value of the <xref:Microsoft.Data.SqlClient.Server.SqlFacetAttribute.Scale%2A> property is 38; the default value is 0.
|
||||
|
||||
]]></format>
|
||||
</remarks>
|
||||
</Scale>
|
||||
</members>
|
||||
</docs>
|
|
@ -1,125 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
<docs>
|
||||
<members name="SqlFunctionAttribute">
|
||||
<SqlFunctionAttribute>
|
||||
<summary>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.</summary>
|
||||
<remarks>
|
||||
<format type="text/markdown"><![CDATA[
|
||||
|
||||
## Examples
|
||||
The following example shows an aggregate function that returns a list of files in the specified directory path.
|
||||
|
||||
[!code-csharp[SqlFunctionAttribute Sample#1](~/../sqlclient/doc/samples/SqlFunctionAttribute.cs#1)]
|
||||
|
||||
]]></format>
|
||||
</remarks>
|
||||
</SqlFunctionAttribute>
|
||||
<ctor>
|
||||
<summary>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 <see cref="P:Microsoft.Data.SqlClient.Server.SqlFunctionAttribute.DataAccess" />, <see cref="P:Microsoft.Data.SqlClient.Server.SqlFunctionAttribute.FillRowMethodName" />, <see cref="P:Microsoft.Data.SqlClient.Server.SqlFunctionAttribute.IsDeterministic" />, <see cref="P:Microsoft.Data.SqlClient.Server.SqlFunctionAttribute.IsPrecise" />, <see cref="P:Microsoft.Data.SqlClient.Server.SqlFunctionAttribute.Name" />, <see cref="P:Microsoft.Data.SqlClient.Server.SqlFunctionAttribute.SystemDataAccess" />, and <see cref="P:Microsoft.Data.SqlClient.Server.SqlFunctionAttribute.TableDefinition" /> properties of the function attribute.</summary>
|
||||
<remarks>To be added.</remarks>
|
||||
</ctor>
|
||||
<DataAccess>
|
||||
<summary>Indicates whether the function involves access to user data stored in the local instance of SQL Server.</summary>
|
||||
<value>
|
||||
<see cref="T:Microsoft.Data.SqlClient.Server.DataAccessKind" />.<see langword="None" />: Does not access data. <see cref="T:Microsoft.Data.SqlClient.Server.DataAccessKind" />.<see langword="Read" />: Only reads user data.</value>
|
||||
<remarks>
|
||||
<format type="text/markdown"><![CDATA[
|
||||
|
||||
## Remarks
|
||||
The default is <xref:Microsoft.Data.SqlClient.Server.DataAccessKind.None>.<xref:Microsoft.Data.SqlClient.Server.SqlFunctionAttribute.DataAccess%2A> 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 <xref:Microsoft.Data.SqlClient.Server.DataAccessKind.Read> property should be set.
|
||||
|
||||
]]></format>
|
||||
</remarks>
|
||||
</DataAccess>
|
||||
<FillRowMethodName>
|
||||
<summary>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.</summary>
|
||||
<value>A <see cref="T:System.String" /> 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.</value>
|
||||
</FillRowMethodName>
|
||||
<IsDeterministic>
|
||||
<summary>Indicates whether the user-defined function is deterministic.</summary>
|
||||
<value>
|
||||
<see langword="true" /> if the function is deterministic; otherwise <see langword="false" />.</value>
|
||||
<remarks>
|
||||
<format type="text/markdown"><![CDATA[
|
||||
|
||||
## Remarks
|
||||
A user-defined function is said to be deterministic if it always produces the same output values given the same input values and the same database state.
|
||||
|
||||
The <xref:Microsoft.Data.SqlClient.Server.SqlFunctionAttribute.IsDeterministic%2A> 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 <xref:Microsoft.Data.SqlClient.Server.SqlFunctionAttribute.DataAccess%2A> and <xref:Microsoft.Data.SqlClient.Server.SqlFunctionAttribute.SystemDataAccess%2A> properties.
|
||||
|
||||
Note that data access to remote servers (for example, using a <xref:Microsoft.Data.SqlClient.SqlConnection> to connect to another SQL Server instance) is available in user-defined functions. However, you must still honor the <xref:Microsoft.Data.SqlClient.Server.SqlFunctionAttribute.IsDeterministic%2A> 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.
|
||||
|
||||
]]></format>
|
||||
</remarks>
|
||||
</IsDeterministic>
|
||||
<IsPrecise>
|
||||
<summary>Indicates whether the function involves imprecise computations, such as floating point operations.</summary>
|
||||
<value>
|
||||
<see langword="true" /> if the function involves precise computations; otherwise <see langword="false" />.</value>
|
||||
<remarks>
|
||||
<format type="text/markdown"><![CDATA[
|
||||
|
||||
## Remarks
|
||||
Precision of a function is one of the properties used to determine if computed columns that use this function can be indexed.
|
||||
|
||||
The default value of this attribute is `false`.
|
||||
|
||||
]]></format>
|
||||
</remarks>
|
||||
</IsPrecise>
|
||||
<Name>
|
||||
<summary>The name under which the function should be registered in SQL Server.</summary>
|
||||
<value>A <see cref="T:System.String" /> value representing the name under which the function should be registered.</value>
|
||||
<remarks>
|
||||
<format type="text/markdown"><![CDATA[
|
||||
|
||||
## Remarks
|
||||
This attribute is used only by Microsoft Visual Studio to automatically register the specified method as a user-defined function. It is not used by SQL Server.
|
||||
|
||||
Thee following example specifies that the user-defined function is referenced using the name `sp_scalarFunc`.
|
||||
|
||||
## Examples
|
||||
[!code-csharp[SqlFunction#10](~/../sqlclient/doc/samples/SqlFunction.cs#10)]
|
||||
]]></format>
|
||||
</remarks>
|
||||
</Name>
|
||||
<SystemDataAccess>
|
||||
<summary>Indicates whether the function requires access to data stored in the system catalogs or virtual system tables of SQL Server.</summary>
|
||||
<value>
|
||||
<see cref="T:Microsoft.Data.SqlClient.Server.DataAccessKind" />.<see langword="None" />: Does not access system data. <see cref="T:Microsoft.Data.SqlClient.Server.DataAccessKind" />.<see langword="Read" />: Only reads system data.</value>
|
||||
<remarks>
|
||||
<format type="text/markdown"><![CDATA[
|
||||
|
||||
## Remarks
|
||||
The default is <xref:Microsoft.Data.SqlClient.Server.SystemDataAccessKind.None>.
|
||||
|
||||
]]></format>
|
||||
</remarks>
|
||||
</SystemDataAccess>
|
||||
<TableDefinition>
|
||||
<summary>A string that represents the table definition of the results, if the method is used as a table-valued function (TVF).</summary>
|
||||
<value>A <see cref="T:System.String" /> value representing the table definition of the results.</value>
|
||||
<remarks>
|
||||
<format type="text/markdown"><![CDATA[
|
||||
|
||||
## Remarks
|
||||
This attribute is used only by Microsoft Visual Studio to automatically register the specified method as a TVF. It is not used by SQL Server.
|
||||
|
||||
The following example specifies that the user-defined function is referenced using the name `sp_tableFunc`. The `TableDefinition` property has the value `letter nchar(1)`.
|
||||
|
||||
## Examples
|
||||
[!code-csharp[SqlFunction#11](~/../sqlclient/doc/samples/SqlFunction.cs#11)]
|
||||
|
||||
]]></format>
|
||||
</remarks>
|
||||
</TableDefinition>
|
||||
</members>
|
||||
</docs>
|
|
@ -1,68 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
<docs>
|
||||
<members name="SqlMethodAttribute">
|
||||
<SqlMethodAttribute>
|
||||
<summary>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.</summary>
|
||||
<remarks>
|
||||
<format type="text/markdown"><![CDATA[
|
||||
|
||||
## Remarks
|
||||
For a property, the <xref:Microsoft.Data.SqlClient.Server.SqlMethodAttribute> should be used on the setter or the getter directly.
|
||||
|
||||
<xref:Microsoft.Data.SqlClient.Server.SqlMethodAttribute> inherits from a <xref:Microsoft.Data.SqlClient.Server.SqlFunctionAttribute>, so <xref:Microsoft.Data.SqlClient.Server.SqlMethodAttribute> inherits the `FillRowMethodName` and `TableDefinition` fields from <xref:Microsoft.Data.SqlClient.Server.SqlFunctionAttribute>. 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)]
|
||||
|
||||
]]></format>
|
||||
</remarks>
|
||||
</SqlMethodAttribute>
|
||||
<ctor>
|
||||
<summary>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.</summary>
|
||||
<remarks>To be added.</remarks>
|
||||
</ctor>
|
||||
<InvokeIfReceiverIsNull>
|
||||
<summary>Indicates whether SQL Server should invoke the method on null instances.</summary>
|
||||
<value> <see langword="true" /> if SQL Server should invoke the method on null instances; otherwise, <see langword="false" />. If the method cannot be invoked (because of an attribute on the method), the SQL Server <see langword="DbNull" /> is returned.</value>
|
||||
<remarks>
|
||||
<format type="text/markdown"><![CDATA[
|
||||
|
||||
## Remarks
|
||||
|
||||
The default value of the `InvokeIfReceiverIsNull` property is `false`. That is, the method is not invoked on a null instance. If `InvokeIfReceiverIsNull` is `true`, the return value of the method depends upon its type. If the return type of the method is nullable, the distinguished null value for the type is returned. If the return type is non-nullable, the default CLR value for the type is returned. The default value for reference types is `null`. The default value for a value type is the value that is returned when you call the parameterless constructor for the type.
|
||||
|
||||
]]></format>
|
||||
</remarks>
|
||||
</InvokeIfReceiverIsNull>
|
||||
<IsMutator>
|
||||
<summary>Indicates whether a method on a user-defined type (UDT) is a mutator.</summary>
|
||||
<value> <see langword="true" /> if the method is a mutator; otherwise <see langword="false" />.</value>
|
||||
<remarks>
|
||||
<format type="text/markdown"><![CDATA[
|
||||
|
||||
## Remarks
|
||||
If the <xref:Microsoft.Data.SqlClient.Server.SqlMethodAttribute.IsMutator%2A> 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 <xref:Microsoft.Data.SqlClient.Server.SqlMethodAttribute.IsMutator%2A> property is `false`.
|
||||
|
||||
A property can be a mutator if <xref:Microsoft.Data.SqlClient.Server.SqlMethodAttribute> is used on the setter and <xref:Microsoft.Data.SqlClient.Server.SqlMethodAttribute.IsMutator%2A> is set to `true`. However, a property setter is implicitly treated as a mutator, so it is not necessary to set the <xref:Microsoft.Data.SqlClient.Server.SqlMethodAttribute.IsMutator%2A> property of the <xref:Microsoft.Data.SqlClient.Server.SqlMethodAttribute> to `true`.
|
||||
|
||||
]]></format>
|
||||
</remarks>
|
||||
</IsMutator>
|
||||
<OnNullCall>
|
||||
<summary>Indicates whether the method on a user-defined type (UDT) is called when <see langword="null" /> input arguments are specified in the method invocation.</summary>
|
||||
<value> <see langword="true" /> if the method is called when <see langword="null" /> input arguments are specified in the method invocation; <see langword="false" /> if the method returns a <see langword="null" /> value when any of its input parameters are <see langword="null" />. If the method cannot be invoked (because of an attribute on the method), the SQL Server <see langword="DbNull" /> is returned.</value>
|
||||
<remarks>
|
||||
<format type="text/markdown"><![CDATA[
|
||||
|
||||
## Remarks
|
||||
The default value of the <xref:Microsoft.Data.SqlClient.Server.SqlMethodAttribute.OnNullCall%2A> property is `true`.
|
||||
|
||||
]]></format>
|
||||
</remarks>
|
||||
</OnNullCall>
|
||||
</members>
|
||||
</docs>
|
|
@ -1,132 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
<docs>
|
||||
<members name="SqlUserDefinedAggregateAttribute">
|
||||
<SqlUserDefinedAggregateAttribute>
|
||||
<summary>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.</summary>
|
||||
<remarks>
|
||||
<format type="text/markdown"><![CDATA[
|
||||
|
||||
## Remarks
|
||||
SQL Server creates a user-defined aggregate that is bound to the class definition that has the <xref:Microsoft.Data.SqlClient.Server.SqlUserDefinedAggregateAttribute> 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 <xref:Microsoft.Data.SqlClient.Server.SqlUserDefinedAggregateAttribute> 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)]
|
||||
|
||||
]]></format>
|
||||
</remarks>
|
||||
</SqlUserDefinedAggregateAttribute>
|
||||
<ctor>
|
||||
<param name="format">One of the <see cref="T:Microsoft.Data.SqlClient.Server.Format" /> values representing the serialization format of the aggregate.</param>
|
||||
<summary>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.</summary>
|
||||
</ctor>
|
||||
<Format>
|
||||
<summary>The serialization format as a <see cref="T:Microsoft.Data.SqlClient.Server.Format" />.</summary>
|
||||
<value>A <see cref="T:Microsoft.Data.SqlClient.Server.Format" /> representing the serialization format.</value>
|
||||
<remarks>
|
||||
<format type="text/markdown"><![CDATA[
|
||||
|
||||
## Examples
|
||||
[!code-csharp[SqlUserDefinedAggregate1#6](~/../sqlclient/doc/samples/SqlUserDefinedAggregate1.cs#6)]
|
||||
|
||||
]]></format>
|
||||
</remarks>
|
||||
</Format>
|
||||
<IsInvariantToDuplicates>
|
||||
<summary>Indicates whether the aggregate is invariant to duplicates.</summary>
|
||||
<value> <see langword="true" /> if the aggregate is invariant to duplicates; otherwise <see langword="false" />.</value>
|
||||
<remarks>
|
||||
<format type="text/markdown"><![CDATA[
|
||||
|
||||
## Remarks
|
||||
Used by the query processor, this property is `true` if the aggregate is invariant to duplicates. That is, the aggregate of S, {X} is the same as aggregate of S when X is already in S. For example, aggregate functions such as MIN and MAX satisfy this property, while SUM does not.
|
||||
|
||||
Incorrectly setting this property can result in incorrect query results. This property is not an optimizer hint; it affects both the plan selected and the results returned by the query.
|
||||
|
||||
]]></format>
|
||||
</remarks>
|
||||
</IsInvariantToDuplicates>
|
||||
<IsInvariantToNulls>
|
||||
<summary>Indicates whether the aggregate is invariant to nulls.</summary>
|
||||
<value> <see langword="true" /> if the aggregate is invariant to nulls; otherwise <see langword="false" />.</value>
|
||||
<remarks>
|
||||
<format type="text/markdown"><![CDATA[
|
||||
|
||||
## Remarks
|
||||
Used by the query processor, this property is `true` if the aggregate is invariant to nulls. That is, the aggregate of S, {NULL} is the same as aggregate of S. For example, aggregate functions such as MIN and MAX satisfy this property, while COUNT(*) does not.
|
||||
|
||||
Incorrectly setting this property can result in incorrect query results. This property is not an optimizer hint; it affects the plan selected and the results returned by the query.
|
||||
|
||||
]]></format>
|
||||
</remarks>
|
||||
</IsInvariantToNulls>
|
||||
<IsInvariantToOrder>
|
||||
<summary>Indicates whether the aggregate is invariant to order.</summary>
|
||||
<value> <see langword="true" /> if the aggregate is invariant to order; otherwise <see langword="false" />.</value>
|
||||
<remarks>
|
||||
<format type="text/markdown"><![CDATA[
|
||||
|
||||
## Remarks
|
||||
Reserved for future use. This property is not currently used by the query processor: order is currently not guaranteed.
|
||||
|
||||
Incorrectly setting this property can result in incorrect query results. This property is not an optimizer hint; it affects the plan selected and the results returned by the query.
|
||||
|
||||
The default value for this property is `false`.
|
||||
|
||||
]]></format>
|
||||
</remarks>
|
||||
</IsInvariantToOrder>
|
||||
<IsNullIfEmpty>
|
||||
<summary>Indicates whether the aggregate returns <see langword="null" /> if no values have been accumulated.</summary>
|
||||
<value> <see langword="true" /> if the aggregate returns <see langword="null" /> if no values have been accumulated; otherwise <see langword="false" />.</value>
|
||||
<remarks>
|
||||
<format type="text/markdown"><![CDATA[
|
||||
|
||||
## Remarks
|
||||
Used by the query processor, this property is `true` if the aggregate returns `null` if no values have been accumulated.
|
||||
|
||||
Incorrectly setting this property can result in incorrect query results. This property is not an optimizer hint; it affects the plan selected and the results returned by the query.
|
||||
|
||||
]]></format>
|
||||
</remarks>
|
||||
</IsNullIfEmpty>
|
||||
<MaxByteSize>
|
||||
<summary>The maximum size, in bytes, of the aggregate instance.</summary>
|
||||
<value>An <see cref="T:System.Int32" /> value representing the maximum size of the aggregate instance.</value>
|
||||
<remarks>
|
||||
<format type="text/markdown"><![CDATA[
|
||||
|
||||
## Remarks
|
||||
This property does not have to be specified for Native format serialization.
|
||||
|
||||
You must specify the <xref:Microsoft.Data.SqlClient.Server.SqlUserDefinedAggregateAttribute.MaxByteSize%2A> property with the UserDefined serialization <xref:Microsoft.Data.SqlClient.Server.Format>.
|
||||
|
||||
The maximum allowed value for this property is specified by the <xref:Microsoft.Data.SqlClient.Server.SqlUserDefinedAggregateAttribute.MaxByteSizeValue> 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, <xref:Microsoft.Data.SqlClient.Server.SqlUserDefinedAggregateAttribute.MaxByteSize%2A> refers to the total size of the serialized data. Consider an aggregate serializing a string of 10 characters (<xref:System.Char>). When the string is serialized using a <xref:System.IO.BinaryWriter>, 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 <xref:Microsoft.Data.SqlClient.Server.SqlUserDefinedAggregateAttribute.MaxByteSize%2A>, 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.
|
||||
|
||||
]]></format>
|
||||
</remarks>
|
||||
</MaxByteSize>
|
||||
<MaxByteSizeValue>
|
||||
<summary>The maximum size, in bytes, required to store the state of this aggregate instance during computation.</summary>
|
||||
<remarks>
|
||||
<format type="text/markdown"><![CDATA[
|
||||
|
||||
## Remarks
|
||||
An <xref:System.Int32> value representing the maximum size of the aggregate instance.
|
||||
|
||||
]]></format>
|
||||
</remarks>
|
||||
</MaxByteSizeValue>
|
||||
<Name>
|
||||
<summary>The name of the aggregate.</summary>
|
||||
<value>A <see cref="T:System.String" /> value representing the name of the aggregate.</value>
|
||||
</Name>
|
||||
</members>
|
||||
</docs>
|
|
@ -1,137 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
<docs>
|
||||
<members name="SqlUserDefinedTypeAttribute">
|
||||
<SqlUserDefinedTypeAttribute>
|
||||
<summary>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.</summary>
|
||||
<remarks>
|
||||
<format type="text/markdown"><![CDATA[
|
||||
|
||||
## Remarks
|
||||
SQL Server creates a user-defined type that is bound to the type definition that has the <xref:Microsoft.Data.SqlClient.Server.SqlUserDefinedTypeAttribute> 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)]
|
||||
|
||||
]]></format>
|
||||
</remarks>
|
||||
</SqlUserDefinedTypeAttribute>
|
||||
<ctor>
|
||||
<param name="format">One of the <see cref="T:Microsoft.Data.SqlClient.Server.Format" /> values representing the serialization format of the type.</param>
|
||||
<summary>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.</summary>
|
||||
<remarks>
|
||||
<format type="text/markdown"><![CDATA[
|
||||
|
||||
## Remarks
|
||||
The following example specifies that the `Format` of the user-defined type is `SerializedDataWithMetadata` and the `MaxByteSize` is 8000 bytes.
|
||||
|
||||
## Examples
|
||||
[!code-csharp[SqlUserDefinedType1#12](~/../sqlclient/doc/samples/SqlUserDefinedType1.cs#12)]
|
||||
|
||||
]]></format>
|
||||
</remarks>
|
||||
</ctor>
|
||||
<Format>
|
||||
<summary>The serialization format as a <see cref="T:Microsoft.Data.SqlClient.Server.Format" /> .</summary>
|
||||
<value>A <see cref="T:Microsoft.Data.SqlClient.Server.Format" /> value representing the serialization format.</value>
|
||||
</Format>
|
||||
<IsByteOrdered>
|
||||
<summary>Indicates whether the user-defined type is byte ordered.</summary>
|
||||
<value>
|
||||
<see langword="true" /> if the user-defined type is byte ordered; otherwise <see langword="false" /> .</value>
|
||||
<remarks>
|
||||
<format type="text/markdown"><![CDATA[
|
||||
|
||||
## Remarks
|
||||
When set to `true`, the <xref:Microsoft.Data.SqlClient.Server.SqlUserDefinedTypeAttribute.IsByteOrdered%2A> 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 <xref:Microsoft.Data.SqlClient.Server.SqlUserDefinedTypeAttribute.IsByteOrdered%2A> 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 <xref:Microsoft.Data.SqlClient.Server.SqlUserDefinedTypeAttribute.IsByteOrdered%2A> is set to `true`:
|
||||
|
||||
- Equal to (=)
|
||||
|
||||
- Not equal to (!=)
|
||||
|
||||
- Greater than (>)
|
||||
|
||||
- Less than (\<)
|
||||
|
||||
- Greater than or equal to (>=)
|
||||
|
||||
- Less than or equal to (<=)
|
||||
|
||||
]]></format>
|
||||
</remarks>
|
||||
</IsByteOrdered>
|
||||
<IsFixedLength>
|
||||
<summary>Indicates whether all instances of this user-defined type are the same length.</summary>
|
||||
<value>
|
||||
<see langword="true" /> if all instances of this type are the same length; otherwise <see langword="false" />.
|
||||
</value>
|
||||
<remarks>
|
||||
<format type="text/markdown"><![CDATA[
|
||||
|
||||
## Remarks
|
||||
If set to `true`, all instances of UDTs corresponding to this common language runtime (CLR) type must have a length in bytes exactly equal to <xref:Microsoft.Data.SqlClient.Server.SqlUserDefinedTypeAttribute.MaxByteSize%2A>. This attribute is only relevant for UDTs with `UserDefined` serialization <xref:Microsoft.Data.SqlClient.Server.Format>.
|
||||
|
||||
]]></format>
|
||||
</remarks>
|
||||
</IsFixedLength>
|
||||
<MaxByteSize>
|
||||
<summary>The maximum size of the instance, in bytes.</summary>
|
||||
<value>An <see cref="T:System.Int32" /> value representing the maximum size of the instance.</value>
|
||||
<remarks>
|
||||
<format type="text/markdown"><![CDATA[
|
||||
|
||||
## Remarks
|
||||
You must specify the <xref:Microsoft.Data.SqlClient.Server.SqlUserDefinedTypeAttribute.MaxByteSize%2A> property with the `UserDefined` serialization <xref:Microsoft.Data.SqlClient.Server.Format>.
|
||||
|
||||
When connecting to SQL Server 2005 or earlier, <xref:Microsoft.Data.SqlClient.Server.SqlUserDefinedTypeAttribute.MaxByteSize%2A> must be between 1 and 8000.
|
||||
|
||||
When connecting to SQL Server 2008 or later, set <xref:Microsoft.Data.SqlClient.Server.SqlUserDefinedTypeAttribute.MaxByteSize%2A> 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, <xref:Microsoft.Data.SqlClient.Server.SqlUserDefinedTypeAttribute.MaxByteSize%2A> 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 (<xref:System.Char>). When the UDT is serialized using a <xref:System.IO.BinaryWriter>, 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 <xref:Microsoft.Data.SqlClient.Server.SqlUserDefinedTypeAttribute.MaxByteSize%2A>, 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 <xref:Microsoft.Data.SqlClient.Server.Format>.
|
||||
|
||||
]]></format>
|
||||
</remarks>
|
||||
</MaxByteSize>
|
||||
<Name>
|
||||
<summary>The SQL Server name of the user-defined type.</summary>
|
||||
<value>A <see cref="T:System.String" /> value representing the SQL Server name of the user-defined type.</value>
|
||||
<remarks>
|
||||
<format type="text/markdown"><![CDATA[
|
||||
|
||||
## Remarks
|
||||
The <xref:Microsoft.Data.SqlClient.Server.SqlUserDefinedTypeAttribute.Name%2A> property is not used within SQL Server, but is used by the Microsoft Visual Studio .NET Integrated Development Environment (IDE).
|
||||
|
||||
]]></format>
|
||||
</remarks>
|
||||
</Name>
|
||||
<ValidationMethodName>
|
||||
<summary>The name of the method used to validate instances of the user-defined type.</summary>
|
||||
<value>A <see cref="T:System.String" /> representing the name of the method used to validate instances of the user-defined type.</value>
|
||||
<remarks>
|
||||
<format type="text/markdown"><![CDATA[
|
||||
|
||||
## Remarks
|
||||
The method specified by this attribute validates instances of the UDT when the UDT has been deserialized from a binary value that is not trusted.
|
||||
|
||||
]]></format>
|
||||
</remarks>
|
||||
</ValidationMethodName>
|
||||
</members>
|
||||
</docs>
|
|
@ -1,26 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
<docs>
|
||||
<members name="SystemDataAccessKind">
|
||||
<SystemDataAccessKind>
|
||||
<summary>Describes the type of access to system data for a user-defined method or function.</summary>
|
||||
<remarks>
|
||||
<format type="text/markdown"><![CDATA[
|
||||
|
||||
## Remarks
|
||||
Describes the type of access to system data for a user-defined method or function.
|
||||
|
||||
This enumeration is used in <xref:Microsoft.Data.SqlClient.Server.SqlMethodAttribute> and <xref:Microsoft.Data.SqlClient.Server.SqlFunctionAttribute> 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).
|
||||
|
||||
]]></format>
|
||||
</remarks>
|
||||
</SystemDataAccessKind>
|
||||
<None>
|
||||
<summary>The method or function does not access system data.</summary>
|
||||
</None>
|
||||
<Read>
|
||||
<summary>The method or function reads system data.</summary>
|
||||
</Read>
|
||||
</members>
|
||||
</docs>
|
|
@ -46,6 +46,7 @@
|
|||
<NetFxSource>$(ManagedSourceCode)netfx\</NetFxSource>
|
||||
<NetFxResources>$(ManagedSourceCode)netfx\src\Resources\</NetFxResources>
|
||||
<AddOnsPath>$(ManagedSourceCode)add-ons\</AddOnsPath>
|
||||
<SqlServerSource>$(RepoRoot)src\Microsoft.SqlServer.Server\</SqlServerSource>
|
||||
<ObjFolder>$(Artifacts)obj\</ObjFolder>
|
||||
<CommonPath>$(NetCoreSource)src\Common\src</CommonPath>
|
||||
<CommonTestPath>$(NetCoreSource)src\Common\tests</CommonTestPath>
|
||||
|
|
|
@ -1832,37 +1832,6 @@ namespace Microsoft.Data.SqlClient
|
|||
}
|
||||
namespace Microsoft.Data.SqlClient.Server
|
||||
{
|
||||
/// <include file='../../../../doc/snippets/Microsoft.Data.SqlClient.Server/DataAccessKind.xml' path='docs/members[@name="DataAccessKind"]/DataAccessKind/*'/>
|
||||
public enum DataAccessKind
|
||||
{
|
||||
/// <include file='../../../../doc/snippets/Microsoft.Data.SqlClient.Server/DataAccessKind.xml' path='docs/members[@name="DataAccessKind"]/None/*'/>
|
||||
None = 0,
|
||||
/// <include file='../../../../doc/snippets/Microsoft.Data.SqlClient.Server/DataAccessKind.xml' path='docs/members[@name="DataAccessKind"]/Read/*'/>
|
||||
Read = 1
|
||||
}
|
||||
/// <include file='../../../../doc/snippets/Microsoft.Data.SqlClient.Server/Format.xml' path='docs/members[@name="Format"]/Format/*'/>
|
||||
public enum Format
|
||||
{
|
||||
/// <include file='../../../../doc/snippets/Microsoft.Data.SqlClient.Server/Format.xml' path='docs/members[@name="Format"]/Unknown/*'/>
|
||||
Unknown = 0,
|
||||
/// <include file='../../../../doc/snippets/Microsoft.Data.SqlClient.Server/Format.xml' path='docs/members[@name="Format"]/Native/*'/>
|
||||
Native = 1,
|
||||
/// <include file='../../../../doc/snippets/Microsoft.Data.SqlClient.Server/Format.xml' path='docs/members[@name="Format"]/UserDefined/*'/>
|
||||
UserDefined = 2
|
||||
}
|
||||
/// <include file='../../../../doc/snippets/Microsoft.Data.SqlClient.Server/IBinarySerialize.xml' path='docs/members[@name="IBinarySerialize"]/IBinarySerialize/*'/>
|
||||
public interface IBinarySerialize
|
||||
{
|
||||
/// <include file='../../../../doc/snippets/Microsoft.Data.SqlClient.Server/IBinarySerialize.xml' path='docs/members[@name="IBinarySerialize"]/Read/*'/>
|
||||
void Read(System.IO.BinaryReader r);
|
||||
/// <include file='../../../../doc/snippets/Microsoft.Data.SqlClient.Server/IBinarySerialize.xml' path='docs/members[@name="IBinarySerialize"]/Write/*'/>
|
||||
void Write(System.IO.BinaryWriter w);
|
||||
}
|
||||
/// <include file='../../../../doc/snippets/Microsoft.Data.SqlClient.Server/InvalidUdtException.xml' path='docs/members[@name="InvalidUdtException"]/InvalidUdtException/*'/>
|
||||
public sealed partial class InvalidUdtException : System.SystemException
|
||||
{
|
||||
internal InvalidUdtException() { }
|
||||
}
|
||||
/// <include file='../../../../doc/snippets/Microsoft.Data.SqlClient.Server/SqlDataRecord.xml' path='docs/members[@name="SqlDataRecord"]/SqlDataRecord/*'/>
|
||||
public partial class SqlDataRecord : System.Data.IDataRecord
|
||||
{
|
||||
|
@ -2033,44 +2002,6 @@ namespace Microsoft.Data.SqlClient.Server
|
|||
/// <include file='../../../../doc/snippets/Microsoft.Data.SqlClient.Server/SqlDataRecord.xml' path='docs/members[@name="SqlDataRecord"]/SetValues/*'/>
|
||||
public virtual int SetValues(params object[] values) { throw null; }
|
||||
}
|
||||
/// <include file='../../../../doc/snippets/Microsoft.Data.SqlClient.Server/SqlFacetAttribute.xml' path='docs/members[@name="SqlFacetAttribute"]/SqlFacetAttribute/*'/>
|
||||
[System.AttributeUsageAttribute(System.AttributeTargets.Field | System.AttributeTargets.Property | System.AttributeTargets.ReturnValue | System.AttributeTargets.Parameter, AllowMultiple = false, Inherited = false)]
|
||||
public partial class SqlFacetAttribute : System.Attribute
|
||||
{
|
||||
/// <include file='../../../../doc/snippets/Microsoft.Data.SqlClient.Server/SqlFacetAttribute.xml' path='docs/members[@name="SqlFacetAttribute"]/ctor/*'/>
|
||||
public SqlFacetAttribute() { }
|
||||
/// <include file='../../../../doc/snippets/Microsoft.Data.SqlClient.Server/SqlFacetAttribute.xml' path='docs/members[@name="SqlFacetAttribute"]/IsFixedLength/*'/>
|
||||
public bool IsFixedLength { get { throw null; } set { } }
|
||||
/// <include file='../../../../doc/snippets/Microsoft.Data.SqlClient.Server/SqlFacetAttribute.xml' path='docs/members[@name="SqlFacetAttribute"]/IsNullable/*'/>
|
||||
public bool IsNullable { get { throw null; } set { } }
|
||||
/// <include file='../../../../doc/snippets/Microsoft.Data.SqlClient.Server/SqlFacetAttribute.xml' path='docs/members[@name="SqlFacetAttribute"]/MaxSize/*'/>
|
||||
public int MaxSize { get { throw null; } set { } }
|
||||
/// <include file='../../../../doc/snippets/Microsoft.Data.SqlClient.Server/SqlFacetAttribute.xml' path='docs/members[@name="SqlFacetAttribute"]/Precision/*'/>
|
||||
public int Precision { get { throw null; } set { } }
|
||||
/// <include file='../../../../doc/snippets/Microsoft.Data.SqlClient.Server/SqlFacetAttribute.xml' path='docs/members[@name="SqlFacetAttribute"]/Scale/*'/>
|
||||
public int Scale { get { throw null; } set { } }
|
||||
}
|
||||
/// <include file='./../../../../doc/snippets/Microsoft.Data.SqlClient.Server/SqlFunctionAttribute.xml' path='docs/members[@name="SqlFunctionAttribute"]/SqlFunctionAttribute/*' />
|
||||
[System.AttributeUsage(System.AttributeTargets.Method, AllowMultiple = false, Inherited = false), System.SerializableAttribute]
|
||||
public partial class SqlFunctionAttribute : System.Attribute
|
||||
{
|
||||
/// <include file='./../../../../doc/snippets/Microsoft.Data.SqlClient.Server/SqlFunctionAttribute.xml' path='docs/members[@name="SqlFunctionAttribute"]/ctor/*' />
|
||||
public SqlFunctionAttribute() { }
|
||||
/// <include file='./../../../../doc/snippets/Microsoft.Data.SqlClient.Server/SqlFunctionAttribute.xml' path='docs/members[@name="SqlFunctionAttribute"]/IsDeterministic/*' />
|
||||
public bool IsDeterministic { get { throw null; } set { } }
|
||||
/// <include file='./../../../../doc/snippets/Microsoft.Data.SqlClient.Server/SqlFunctionAttribute.xml' path='docs/members[@name="SqlFunctionAttribute"]/DataAccess/*' />
|
||||
public DataAccessKind DataAccess { get { throw null; } set { } }
|
||||
/// <include file='./../../../../doc/snippets/Microsoft.Data.SqlClient.Server/SqlFunctionAttribute.xml' path='docs/members[@name="SqlFunctionAttribute"]/SystemDataAccess/*' />
|
||||
public SystemDataAccessKind SystemDataAccess { get { throw null; } set { } }
|
||||
/// <include file='./../../../../doc/snippets/Microsoft.Data.SqlClient.Server/SqlFunctionAttribute.xml' path='docs/members[@name="SqlFunctionAttribute"]/IsPrecise/*' />
|
||||
public bool IsPrecise { get { throw null; } set { } }
|
||||
/// <include file='./../../../../doc/snippets/Microsoft.Data.SqlClient.Server/SqlFunctionAttribute.xml' path='docs/members[@name="SqlFunctionAttribute"]/Name/*' />
|
||||
public string Name { get { throw null; } set { } }
|
||||
/// <include file='./../../../../doc/snippets/Microsoft.Data.SqlClient.Server/SqlFunctionAttribute.xml' path='docs/members[@name="SqlFunctionAttribute"]/TableDefinition/*' />
|
||||
public string TableDefinition { get { throw null; } set { } }
|
||||
/// <include file='./../../../../doc/snippets/Microsoft.Data.SqlClient.Server/SqlFunctionAttribute.xml' path='docs/members[@name="SqlFunctionAttribute"]/FillRowMethodName/*' />
|
||||
public string FillRowMethodName { get { throw null; } set { } }
|
||||
}
|
||||
/// <include file='./../../../../doc/snippets/Microsoft.Data.SqlClient.Server/SqlMetaData.xml' path='docs/members[@name="SqlMetaData"]/SqlMetaData/*' />
|
||||
public sealed partial class SqlMetaData
|
||||
{
|
||||
|
@ -2209,69 +2140,6 @@ namespace Microsoft.Data.SqlClient.Server
|
|||
/// <include file='./../../../../doc/snippets/Microsoft.Data.SqlClient.Server/SqlMetaData.xml' path='docs/members[@name="SqlMetaData"]/InferFromValue/*' />
|
||||
public static Microsoft.Data.SqlClient.Server.SqlMetaData InferFromValue(object value, string name) { throw null; }
|
||||
}
|
||||
/// <include file='./../../../../doc/snippets/Microsoft.Data.SqlClient.Server/SqlMethodAttribute.xml' path='docs/members[@name="SqlMethodAttribute"]/SqlMethodAttribute/*' />
|
||||
[System.AttributeUsage(System.AttributeTargets.Method, AllowMultiple = false, Inherited = false), System.SerializableAttribute]
|
||||
public sealed partial class SqlMethodAttribute : SqlFunctionAttribute
|
||||
{
|
||||
/// <include file='./../../../../doc/snippets/Microsoft.Data.SqlClient.Server/SqlMethodAttribute.xml' path='docs/members[@name="SqlMethodAttribute"]/ctor/*' />
|
||||
public SqlMethodAttribute() { }
|
||||
/// <include file='./../../../../doc/snippets/Microsoft.Data.SqlClient.Server/SqlMethodAttribute.xml' path='docs/members[@name="SqlMethodAttribute"]/OnNullCall/*' />
|
||||
public bool OnNullCall { get { throw null; } set { } }
|
||||
/// <include file='./../../../../doc/snippets/Microsoft.Data.SqlClient.Server/SqlMethodAttribute.xml' path='docs/members[@name="SqlMethodAttribute"]/IsMutator/*' />
|
||||
public bool IsMutator { get { throw null; } set { } }
|
||||
/// <include file='./../../../../doc/snippets/Microsoft.Data.SqlClient.Server/SqlMethodAttribute.xml' path='docs/members[@name="SqlMethodAttribute"]/InvokeIfReceiverIsNull/*' />
|
||||
public bool InvokeIfReceiverIsNull { get { throw null; } set { } }
|
||||
}
|
||||
/// <include file='./../../../../doc/snippets/Microsoft.Data.SqlClient.Server/SqlUserDefinedAggregateAttribute.xml' path='docs/members[@name="SqlUserDefinedAggregateAttribute"]/SqlUserDefinedAggregateAttribute/*' />
|
||||
[System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Struct, AllowMultiple = false, Inherited = false)]
|
||||
public sealed partial class SqlUserDefinedAggregateAttribute : System.Attribute
|
||||
{
|
||||
/// <include file='./../../../../doc/snippets/Microsoft.Data.SqlClient.Server/SqlUserDefinedAggregateAttribute.xml' path='docs/members[@name="SqlUserDefinedAggregateAttribute"]/MaxByteSizeValue/*' />
|
||||
public const int MaxByteSizeValue = 8000;
|
||||
/// <include file='./../../../../doc/snippets/Microsoft.Data.SqlClient.Server/SqlUserDefinedAggregateAttribute.xml' path='docs/members[@name="SqlUserDefinedAggregateAttribute"]/ctor/*' />
|
||||
public SqlUserDefinedAggregateAttribute(Format format) { }
|
||||
/// <include file='./../../../../doc/snippets/Microsoft.Data.SqlClient.Server/SqlUserDefinedAggregateAttribute.xml' path='docs/members[@name="SqlUserDefinedAggregateAttribute"]/MaxByteSize/*' />
|
||||
public int MaxByteSize { get { throw null; } set { } }
|
||||
/// <include file='./../../../../doc/snippets/Microsoft.Data.SqlClient.Server/SqlUserDefinedAggregateAttribute.xml' path='docs/members[@name="SqlUserDefinedAggregateAttribute"]/IsInvariantToDuplicates/*' />
|
||||
public bool IsInvariantToDuplicates { get { throw null; } set { } }
|
||||
/// <include file='./../../../../doc/snippets/Microsoft.Data.SqlClient.Server/SqlUserDefinedAggregateAttribute.xml' path='docs/members[@name="SqlUserDefinedAggregateAttribute"]/IsInvariantToNulls/*' />
|
||||
public bool IsInvariantToNulls { get { throw null; } set { } }
|
||||
/// <include file='./../../../../doc/snippets/Microsoft.Data.SqlClient.Server/SqlUserDefinedAggregateAttribute.xml' path='docs/members[@name="SqlUserDefinedAggregateAttribute"]/IsInvariantToOrder/*' />
|
||||
public bool IsInvariantToOrder { get { throw null; } set { } }
|
||||
/// <include file='./../../../../doc/snippets/Microsoft.Data.SqlClient.Server/SqlUserDefinedAggregateAttribute.xml' path='docs/members[@name="SqlUserDefinedAggregateAttribute"]/IsNullIfEmpty/*' />
|
||||
public bool IsNullIfEmpty { get { throw null; } set { } }
|
||||
/// <include file='./../../../../doc/snippets/Microsoft.Data.SqlClient.Server/SqlUserDefinedAggregateAttribute.xml' path='docs/members[@name="SqlUserDefinedAggregateAttribute"]/Format/*' />
|
||||
public Format Format { get { throw null; } }
|
||||
/// <include file='./../../../../doc/snippets/Microsoft.Data.SqlClient.Server/SqlUserDefinedAggregateAttribute.xml' path='docs/members[@name="SqlUserDefinedAggregateAttribute"]/Name/*' />
|
||||
public string Name { get { throw null; } set { } }
|
||||
}
|
||||
/// <include file='./../../../../doc/snippets/Microsoft.Data.SqlClient.Server/SqlUserDefinedTypeAttribute.xml' path='docs/members[@name="SqlUserDefinedTypeAttribute"]/SqlUserDefinedTypeAttribute/*' />
|
||||
[System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Struct, AllowMultiple = false, Inherited = true)]
|
||||
public sealed partial class SqlUserDefinedTypeAttribute : System.Attribute
|
||||
{
|
||||
/// <include file='./../../../../doc/snippets/Microsoft.Data.SqlClient.Server/SqlUserDefinedTypeAttribute.xml' path='docs/members[@name="SqlUserDefinedTypeAttribute"]/ctor/*' />
|
||||
public SqlUserDefinedTypeAttribute(Format format) { }
|
||||
/// <include file='./../../../../doc/snippets/Microsoft.Data.SqlClient.Server/SqlUserDefinedTypeAttribute.xml' path='docs/members[@name="SqlUserDefinedTypeAttribute"]/MaxByteSize/*' />
|
||||
public int MaxByteSize { get { throw null; } set { } }
|
||||
/// <include file='./../../../../doc/snippets/Microsoft.Data.SqlClient.Server/SqlUserDefinedTypeAttribute.xml' path='docs/members[@name="SqlUserDefinedTypeAttribute"]/IsFixedLength/*' />
|
||||
public bool IsFixedLength { get { throw null; } set { } }
|
||||
/// <include file='./../../../../doc/snippets/Microsoft.Data.SqlClient.Server/SqlUserDefinedTypeAttribute.xml' path='docs/members[@name="SqlUserDefinedTypeAttribute"]/IsByteOrdered/*' />
|
||||
public bool IsByteOrdered { get { throw null; } set { } }
|
||||
/// <include file='./../../../../doc/snippets/Microsoft.Data.SqlClient.Server/SqlUserDefinedTypeAttribute.xml' path='docs/members[@name="SqlUserDefinedTypeAttribute"]/Format/*' />
|
||||
public Format Format { get { throw null; } }
|
||||
/// <include file='./../../../../doc/snippets/Microsoft.Data.SqlClient.Server/SqlUserDefinedTypeAttribute.xml' path='docs/members[@name="SqlUserDefinedTypeAttribute"]/ValidationMethodName/*' />
|
||||
public string ValidationMethodName { get { throw null; } set { } }
|
||||
/// <include file='./../../../../doc/snippets/Microsoft.Data.SqlClient.Server/SqlUserDefinedTypeAttribute.xml' path='docs/members[@name="SqlUserDefinedTypeAttribute"]/Name/*' />
|
||||
public string Name { get { throw null; } set { } }
|
||||
}
|
||||
/// <include file='./../../../../doc/snippets/Microsoft.Data.SqlClient.Server/SystemDataAccessKind.xml' path='docs/members[@name="SystemDataAccessKind"]/SystemDataAccessKind/*' />
|
||||
public enum SystemDataAccessKind
|
||||
{
|
||||
/// <include file='./../../../../doc/snippets/Microsoft.Data.SqlClient.Server/SystemDataAccessKind.xml' path='docs/members[@name="SystemDataAccessKind"]/None/*' />
|
||||
None = 0,
|
||||
/// <include file='./../../../../doc/snippets/Microsoft.Data.SqlClient.Server/SystemDataAccessKind.xml' path='docs/members[@name="SystemDataAccessKind"]/Read/*' />
|
||||
Read = 1
|
||||
}
|
||||
}
|
||||
namespace Microsoft.Data.SqlClient.DataClassification
|
||||
{
|
||||
|
|
|
@ -178,12 +178,6 @@
|
|||
<Compile Include="..\..\src\Microsoft\Data\SqlClient\Server\ExtendedClrTypeCode.cs">
|
||||
<Link>Microsoft\Data\SqlClient\Server\ExtendedClrTypeCode.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\..\src\Microsoft\Data\SqlClient\Server\IBinarySerialize.cs">
|
||||
<Link>Microsoft\Data\SqlClient\Server\IBinarySerialize.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\..\src\Microsoft\Data\SqlClient\Server\InvalidUdtException.cs">
|
||||
<Link>Microsoft\Data\SqlClient\Server\InvalidUdtException.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\..\src\Microsoft\Data\SqlClient\Server\ITypedGetters.cs">
|
||||
<Link>Microsoft\Data\SqlClient\Server\ITypedGetters.cs</Link>
|
||||
</Compile>
|
||||
|
@ -238,18 +232,9 @@
|
|||
<Compile Include="..\..\src\Microsoft\Data\SqlClient\Server\SqlDataRecord.netcore.cs">
|
||||
<Link>Microsoft\Data\SqlClient\Server\SqlDataRecord.netcore.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\..\src\Microsoft\Data\SqlClient\Server\SqlFacetAttribute.cs">
|
||||
<Link>Microsoft\Data\SqlClient\Server\SqlFacetAttribute.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\..\src\Microsoft\Data\SqlClient\Server\SqlFunctionAttribute.cs">
|
||||
<Link>Microsoft\Data\SqlClient\Server\SqlFunctionAttribute.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\..\src\Microsoft\Data\SqlClient\Server\SqlMetaData.cs">
|
||||
<Link>Microsoft\Data\SqlClient\Server\SqlMetaData.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\..\src\Microsoft\Data\SqlClient\Server\SqlMethodAttribute.cs">
|
||||
<Link>Microsoft\Data\SqlClient\Server\SqlMethodAttribute.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\..\src\Microsoft\Data\SqlClient\Server\SqlNormalizer.cs">
|
||||
<Link>Microsoft\Data\SqlClient\Server\SqlNormalizer.cs</Link>
|
||||
</Compile>
|
||||
|
@ -259,12 +244,6 @@
|
|||
<Compile Include="..\..\src\Microsoft\Data\SqlClient\SqlTransaction.Common.cs">
|
||||
<Link>Microsoft\Data\SqlClient\SqlTransaction.Common.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\..\src\Microsoft\Data\SqlClient\Server\SqlUserDefinedAggregateAttribute.cs">
|
||||
<Link>Microsoft\Data\SqlClient\Server\SqlUserDefinedAggregateAttribute.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\..\src\Microsoft\Data\SqlClient\Server\SqlUserDefinedTypeAttribute.cs">
|
||||
<Link>Microsoft\Data\SqlClient\Server\SqlUserDefinedTypeAttribute.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\..\src\Microsoft\Data\SqlClient\Server\ValueUtilsSmi.cs">
|
||||
<Link>Microsoft\Data\SqlClient\Server\ValueUtilsSmi.cs</Link>
|
||||
</Compile>
|
||||
|
@ -960,6 +939,9 @@
|
|||
<LogicalName>Microsoft.Data.SqlClient.SqlMetaData.xml</LogicalName>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="$(SqlServerSourceCode)\Microsoft.SqlServer.Server.csproj" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Condition="'$(TargetsWindows)' == 'true' and '$(IsUAPAssembly)' != 'true'" Include="Microsoft.Win32.Registry" Version="$(MicrosoftWin32RegistryVersion)" />
|
||||
<PackageReference Include="System.Configuration.ConfigurationManager" Version="$(SystemConfigurationConfigurationManagerVersion)" />
|
||||
|
|
|
@ -21,7 +21,7 @@ using System.Threading;
|
|||
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 @@ namespace Microsoft.Data.SqlClient
|
|||
|
||||
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 @@ namespace Microsoft.Data.SqlClient
|
|||
|
||||
using (MemoryStream stm = new MemoryStream(maxSize < 0 ? 0 : maxSize))
|
||||
{
|
||||
SerializationHelperSql9.Serialize(stm, o);
|
||||
Server.SerializationHelperSql9.Serialize(stm, o);
|
||||
retval = stm.ToArray();
|
||||
}
|
||||
return retval;
|
||||
|
|
|
@ -9418,7 +9418,7 @@ namespace Microsoft.Data.SqlClient
|
|||
|
||||
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))
|
||||
{
|
||||
|
|
|
@ -1897,41 +1897,6 @@ namespace Microsoft.Data.SqlClient
|
|||
}
|
||||
namespace Microsoft.Data.SqlClient.Server
|
||||
{
|
||||
/// <include file='../../../../doc/snippets/Microsoft.Data.SqlClient.Server/DataAccessKind.xml' path='docs/members[@name="DataAccessKind"]/DataAccessKind/*'/>
|
||||
public enum DataAccessKind
|
||||
{
|
||||
/// <include file='../../../../doc/snippets/Microsoft.Data.SqlClient.Server/DataAccessKind.xml' path='docs/members[@name="DataAccessKind"]/None/*'/>
|
||||
None = 0,
|
||||
/// <include file='../../../../doc/snippets/Microsoft.Data.SqlClient.Server/DataAccessKind.xml' path='docs/members[@name="DataAccessKind"]/Read/*'/>
|
||||
Read = 1
|
||||
}
|
||||
/// <include file='../../../../doc/snippets/Microsoft.Data.SqlClient.Server/Format.xml' path='docs/members[@name="Format"]/Format/*'/>
|
||||
public enum Format
|
||||
{
|
||||
/// <include file='../../../../doc/snippets/Microsoft.Data.SqlClient.Server/Format.xml' path='docs/members[@name="Format"]/Unknown/*'/>
|
||||
Unknown = 0,
|
||||
/// <include file='../../../../doc/snippets/Microsoft.Data.SqlClient.Server/Format.xml' path='docs/members[@name="Format"]/Native/*'/>
|
||||
Native = 1,
|
||||
/// <include file='../../../../doc/snippets/Microsoft.Data.SqlClient.Server/Format.xml' path='docs/members[@name="Format"]/UserDefined/*'/>
|
||||
UserDefined = 2
|
||||
}
|
||||
/// <include file='../../../../doc/snippets/Microsoft.Data.SqlClient.Server/IBinarySerialize.xml' path='docs/members[@name="IBinarySerialize"]/IBinarySerialize/*'/>
|
||||
public interface IBinarySerialize
|
||||
{
|
||||
/// <include file='../../../../doc/snippets/Microsoft.Data.SqlClient.Server/IBinarySerialize.xml' path='docs/members[@name="IBinarySerialize"]/Read/*'/>
|
||||
void Read(System.IO.BinaryReader r);
|
||||
/// <include file='../../../../doc/snippets/Microsoft.Data.SqlClient.Server/IBinarySerialize.xml' path='docs/members[@name="IBinarySerialize"]/Write/*'/>
|
||||
void Write(System.IO.BinaryWriter w);
|
||||
}
|
||||
|
||||
/// <include file='../../../../doc/snippets/Microsoft.Data.SqlClient.Server/InvalidUdtException.xml' path='docs/members[@name="InvalidUdtException"]/InvalidUdtException/*'/>
|
||||
[System.Serializable]
|
||||
public sealed partial class InvalidUdtException : System.SystemException
|
||||
{
|
||||
internal InvalidUdtException() { }
|
||||
private InvalidUdtException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { }
|
||||
|
||||
}
|
||||
/// <include file='../../../../doc/snippets/Microsoft.Data.SqlClient.Server/SqlDataRecord.xml' path='docs/members[@name="SqlDataRecord"]/SqlDataRecord/*'/>
|
||||
public partial class SqlDataRecord : System.Data.IDataRecord
|
||||
{
|
||||
|
@ -2102,44 +2067,6 @@ namespace Microsoft.Data.SqlClient.Server
|
|||
/// <include file='../../../../doc/snippets/Microsoft.Data.SqlClient.Server/SqlDataRecord.xml' path='docs/members[@name="SqlDataRecord"]/SetValues/*'/>
|
||||
public virtual int SetValues(params object[] values) { throw null; }
|
||||
}
|
||||
/// <include file='../../../../doc/snippets/Microsoft.Data.SqlClient.Server/SqlFacetAttribute.xml' path='docs/members[@name="SqlFacetAttribute"]/SqlFacetAttribute/*'/>
|
||||
[System.AttributeUsageAttribute(System.AttributeTargets.Field | System.AttributeTargets.Property | System.AttributeTargets.ReturnValue | System.AttributeTargets.Parameter, AllowMultiple = false, Inherited = false)]
|
||||
public partial class SqlFacetAttribute : System.Attribute
|
||||
{
|
||||
/// <include file='../../../../doc/snippets/Microsoft.Data.SqlClient.Server/SqlFacetAttribute.xml' path='docs/members[@name="SqlFacetAttribute"]/ctor/*'/>
|
||||
public SqlFacetAttribute() { }
|
||||
/// <include file='../../../../doc/snippets/Microsoft.Data.SqlClient.Server/SqlFacetAttribute.xml' path='docs/members[@name="SqlFacetAttribute"]/IsFixedLength/*'/>
|
||||
public bool IsFixedLength { get { throw null; } set { } }
|
||||
/// <include file='../../../../doc/snippets/Microsoft.Data.SqlClient.Server/SqlFacetAttribute.xml' path='docs/members[@name="SqlFacetAttribute"]/IsNullable/*'/>
|
||||
public bool IsNullable { get { throw null; } set { } }
|
||||
/// <include file='../../../../doc/snippets/Microsoft.Data.SqlClient.Server/SqlFacetAttribute.xml' path='docs/members[@name="SqlFacetAttribute"]/MaxSize/*'/>
|
||||
public int MaxSize { get { throw null; } set { } }
|
||||
/// <include file='../../../../doc/snippets/Microsoft.Data.SqlClient.Server/SqlFacetAttribute.xml' path='docs/members[@name="SqlFacetAttribute"]/Precision/*'/>
|
||||
public int Precision { get { throw null; } set { } }
|
||||
/// <include file='../../../../doc/snippets/Microsoft.Data.SqlClient.Server/SqlFacetAttribute.xml' path='docs/members[@name="SqlFacetAttribute"]/Scale/*'/>
|
||||
public int Scale { get { throw null; } set { } }
|
||||
}
|
||||
/// <include file='./../../../../doc/snippets/Microsoft.Data.SqlClient.Server/SqlFunctionAttribute.xml' path='docs/members[@name="SqlFunctionAttribute"]/SqlFunctionAttribute/*' />
|
||||
[System.AttributeUsage(System.AttributeTargets.Method, AllowMultiple = false, Inherited = false), System.SerializableAttribute]
|
||||
public partial class SqlFunctionAttribute : System.Attribute
|
||||
{
|
||||
/// <include file='./../../../../doc/snippets/Microsoft.Data.SqlClient.Server/SqlFunctionAttribute.xml' path='docs/members[@name="SqlFunctionAttribute"]/ctor/*' />
|
||||
public SqlFunctionAttribute() { }
|
||||
/// <include file='./../../../../doc/snippets/Microsoft.Data.SqlClient.Server/SqlFunctionAttribute.xml' path='docs/members[@name="SqlFunctionAttribute"]/IsDeterministic/*' />
|
||||
public bool IsDeterministic { get { throw null; } set { } }
|
||||
/// <include file='./../../../../doc/snippets/Microsoft.Data.SqlClient.Server/SqlFunctionAttribute.xml' path='docs/members[@name="SqlFunctionAttribute"]/DataAccess/*' />
|
||||
public DataAccessKind DataAccess { get { throw null; } set { } }
|
||||
/// <include file='./../../../../doc/snippets/Microsoft.Data.SqlClient.Server/SqlFunctionAttribute.xml' path='docs/members[@name="SqlFunctionAttribute"]/SystemDataAccess/*' />
|
||||
public SystemDataAccessKind SystemDataAccess { get { throw null; } set { } }
|
||||
/// <include file='./../../../../doc/snippets/Microsoft.Data.SqlClient.Server/SqlFunctionAttribute.xml' path='docs/members[@name="SqlFunctionAttribute"]/IsPrecise/*' />
|
||||
public bool IsPrecise { get { throw null; } set { } }
|
||||
/// <include file='./../../../../doc/snippets/Microsoft.Data.SqlClient.Server/SqlFunctionAttribute.xml' path='docs/members[@name="SqlFunctionAttribute"]/Name/*' />
|
||||
public string Name { get { throw null; } set { } }
|
||||
/// <include file='./../../../../doc/snippets/Microsoft.Data.SqlClient.Server/SqlFunctionAttribute.xml' path='docs/members[@name="SqlFunctionAttribute"]/TableDefinition/*' />
|
||||
public string TableDefinition { get { throw null; } set { } }
|
||||
/// <include file='./../../../../doc/snippets/Microsoft.Data.SqlClient.Server/SqlFunctionAttribute.xml' path='docs/members[@name="SqlFunctionAttribute"]/FillRowMethodName/*' />
|
||||
public string FillRowMethodName { get { throw null; } set { } }
|
||||
}
|
||||
/// <include file='./../../../../doc/snippets/Microsoft.Data.SqlClient.Server/SqlMetaData.xml' path='docs/members[@name="SqlMetaData"]/SqlMetaData/*' />
|
||||
public sealed partial class SqlMetaData
|
||||
{
|
||||
|
@ -2278,69 +2205,6 @@ namespace Microsoft.Data.SqlClient.Server
|
|||
/// <include file='./../../../../doc/snippets/Microsoft.Data.SqlClient.Server/SqlMetaData.xml' path='docs/members[@name="SqlMetaData"]/InferFromValue/*' />
|
||||
public static Microsoft.Data.SqlClient.Server.SqlMetaData InferFromValue(object value, string name) { throw null; }
|
||||
}
|
||||
/// <include file='./../../../../doc/snippets/Microsoft.Data.SqlClient.Server/SqlMethodAttribute.xml' path='docs/members[@name="SqlMethodAttribute"]/SqlMethodAttribute/*' />
|
||||
[System.AttributeUsage(System.AttributeTargets.Method, AllowMultiple = false, Inherited = false), System.SerializableAttribute]
|
||||
public sealed partial class SqlMethodAttribute : SqlFunctionAttribute
|
||||
{
|
||||
/// <include file='./../../../../doc/snippets/Microsoft.Data.SqlClient.Server/SqlMethodAttribute.xml' path='docs/members[@name="SqlMethodAttribute"]/ctor/*' />
|
||||
public SqlMethodAttribute() { }
|
||||
/// <include file='./../../../../doc/snippets/Microsoft.Data.SqlClient.Server/SqlMethodAttribute.xml' path='docs/members[@name="SqlMethodAttribute"]/OnNullCall/*' />
|
||||
public bool OnNullCall { get { throw null; } set { } }
|
||||
/// <include file='./../../../../doc/snippets/Microsoft.Data.SqlClient.Server/SqlMethodAttribute.xml' path='docs/members[@name="SqlMethodAttribute"]/IsMutator/*' />
|
||||
public bool IsMutator { get { throw null; } set { } }
|
||||
/// <include file='./../../../../doc/snippets/Microsoft.Data.SqlClient.Server/SqlMethodAttribute.xml' path='docs/members[@name="SqlMethodAttribute"]/InvokeIfReceiverIsNull/*' />
|
||||
public bool InvokeIfReceiverIsNull { get { throw null; } set { } }
|
||||
}
|
||||
/// <include file='./../../../../doc/snippets/Microsoft.Data.SqlClient.Server/SqlUserDefinedAggregateAttribute.xml' path='docs/members[@name="SqlUserDefinedAggregateAttribute"]/SqlUserDefinedAggregateAttribute/*' />
|
||||
[System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Struct, AllowMultiple = false, Inherited = false)]
|
||||
public sealed partial class SqlUserDefinedAggregateAttribute : System.Attribute
|
||||
{
|
||||
/// <include file='./../../../../doc/snippets/Microsoft.Data.SqlClient.Server/SqlUserDefinedAggregateAttribute.xml' path='docs/members[@name="SqlUserDefinedAggregateAttribute"]/MaxByteSizeValue/*' />
|
||||
public const int MaxByteSizeValue = 8000;
|
||||
/// <include file='./../../../../doc/snippets/Microsoft.Data.SqlClient.Server/SqlUserDefinedAggregateAttribute.xml' path='docs/members[@name="SqlUserDefinedAggregateAttribute"]/ctor/*' />
|
||||
public SqlUserDefinedAggregateAttribute(Format format) { }
|
||||
/// <include file='./../../../../doc/snippets/Microsoft.Data.SqlClient.Server/SqlUserDefinedAggregateAttribute.xml' path='docs/members[@name="SqlUserDefinedAggregateAttribute"]/MaxByteSize/*' />
|
||||
public int MaxByteSize { get { throw null; } set { } }
|
||||
/// <include file='./../../../../doc/snippets/Microsoft.Data.SqlClient.Server/SqlUserDefinedAggregateAttribute.xml' path='docs/members[@name="SqlUserDefinedAggregateAttribute"]/IsInvariantToDuplicates/*' />
|
||||
public bool IsInvariantToDuplicates { get { throw null; } set { } }
|
||||
/// <include file='./../../../../doc/snippets/Microsoft.Data.SqlClient.Server/SqlUserDefinedAggregateAttribute.xml' path='docs/members[@name="SqlUserDefinedAggregateAttribute"]/IsInvariantToNulls/*' />
|
||||
public bool IsInvariantToNulls { get { throw null; } set { } }
|
||||
/// <include file='./../../../../doc/snippets/Microsoft.Data.SqlClient.Server/SqlUserDefinedAggregateAttribute.xml' path='docs/members[@name="SqlUserDefinedAggregateAttribute"]/IsInvariantToOrder/*' />
|
||||
public bool IsInvariantToOrder { get { throw null; } set { } }
|
||||
/// <include file='./../../../../doc/snippets/Microsoft.Data.SqlClient.Server/SqlUserDefinedAggregateAttribute.xml' path='docs/members[@name="SqlUserDefinedAggregateAttribute"]/IsNullIfEmpty/*' />
|
||||
public bool IsNullIfEmpty { get { throw null; } set { } }
|
||||
/// <include file='./../../../../doc/snippets/Microsoft.Data.SqlClient.Server/SqlUserDefinedAggregateAttribute.xml' path='docs/members[@name="SqlUserDefinedAggregateAttribute"]/Format/*' />
|
||||
public Format Format { get { throw null; } }
|
||||
/// <include file='./../../../../doc/snippets/Microsoft.Data.SqlClient.Server/SqlUserDefinedAggregateAttribute.xml' path='docs/members[@name="SqlUserDefinedAggregateAttribute"]/Name/*' />
|
||||
public string Name { get { throw null; } set { } }
|
||||
}
|
||||
/// <include file='./../../../../doc/snippets/Microsoft.Data.SqlClient.Server/SqlUserDefinedTypeAttribute.xml' path='docs/members[@name="SqlUserDefinedTypeAttribute"]/SqlUserDefinedTypeAttribute/*' />
|
||||
[System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Struct, AllowMultiple = false, Inherited = true)]
|
||||
public sealed partial class SqlUserDefinedTypeAttribute : System.Attribute
|
||||
{
|
||||
/// <include file='./../../../../doc/snippets/Microsoft.Data.SqlClient.Server/SqlUserDefinedTypeAttribute.xml' path='docs/members[@name="SqlUserDefinedTypeAttribute"]/ctor/*' />
|
||||
public SqlUserDefinedTypeAttribute(Format format) { }
|
||||
/// <include file='./../../../../doc/snippets/Microsoft.Data.SqlClient.Server/SqlUserDefinedTypeAttribute.xml' path='docs/members[@name="SqlUserDefinedTypeAttribute"]/MaxByteSize/*' />
|
||||
public int MaxByteSize { get { throw null; } set { } }
|
||||
/// <include file='./../../../../doc/snippets/Microsoft.Data.SqlClient.Server/SqlUserDefinedTypeAttribute.xml' path='docs/members[@name="SqlUserDefinedTypeAttribute"]/IsFixedLength/*' />
|
||||
public bool IsFixedLength { get { throw null; } set { } }
|
||||
/// <include file='./../../../../doc/snippets/Microsoft.Data.SqlClient.Server/SqlUserDefinedTypeAttribute.xml' path='docs/members[@name="SqlUserDefinedTypeAttribute"]/IsByteOrdered/*' />
|
||||
public bool IsByteOrdered { get { throw null; } set { } }
|
||||
/// <include file='./../../../../doc/snippets/Microsoft.Data.SqlClient.Server/SqlUserDefinedTypeAttribute.xml' path='docs/members[@name="SqlUserDefinedTypeAttribute"]/Format/*' />
|
||||
public Format Format { get { throw null; } }
|
||||
/// <include file='./../../../../doc/snippets/Microsoft.Data.SqlClient.Server/SqlUserDefinedTypeAttribute.xml' path='docs/members[@name="SqlUserDefinedTypeAttribute"]/ValidationMethodName/*' />
|
||||
public string ValidationMethodName { get { throw null; } set { } }
|
||||
/// <include file='./../../../../doc/snippets/Microsoft.Data.SqlClient.Server/SqlUserDefinedTypeAttribute.xml' path='docs/members[@name="SqlUserDefinedTypeAttribute"]/Name/*' />
|
||||
public string Name { get { throw null; } set { } }
|
||||
}
|
||||
/// <include file='./../../../../doc/snippets/Microsoft.Data.SqlClient.Server/SystemDataAccessKind.xml' path='docs/members[@name="SystemDataAccessKind"]/SystemDataAccessKind/*' />
|
||||
public enum SystemDataAccessKind
|
||||
{
|
||||
/// <include file='./../../../../doc/snippets/Microsoft.Data.SqlClient.Server/SystemDataAccessKind.xml' path='docs/members[@name="SystemDataAccessKind"]/None/*' />
|
||||
None = 0,
|
||||
/// <include file='./../../../../doc/snippets/Microsoft.Data.SqlClient.Server/SystemDataAccessKind.xml' path='docs/members[@name="SystemDataAccessKind"]/Read/*' />
|
||||
Read = 1
|
||||
}
|
||||
}
|
||||
namespace Microsoft.Data.SqlClient.DataClassification
|
||||
{
|
||||
|
|
|
@ -26,7 +26,7 @@ using System.Text;
|
|||
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 @@ namespace Microsoft.Data.SqlClient
|
|||
|
||||
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 @@ namespace Microsoft.Data.SqlClient
|
|||
|
||||
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 @@ namespace Microsoft.Data.SqlClient
|
|||
|
||||
using (MemoryStream stm = new MemoryStream(maxSize < 0 ? 0 : maxSize))
|
||||
{
|
||||
SerializationHelperSql9.Serialize(stm, o);
|
||||
Server.SerializationHelperSql9.Serialize(stm, o);
|
||||
retval = stm.ToArray();
|
||||
}
|
||||
return retval;
|
||||
|
|
|
@ -11,9 +11,7 @@ using System.Diagnostics;
|
|||
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;
|
|||
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
|
||||
|
|
|
@ -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
|
||||
{
|
||||
/// <include file='../../../../../../../doc/snippets/Microsoft.Data.SqlClient.Server/IBinarySerialize.xml' path='docs/members[@name="IBinarySerialize"]/IBinarySerialize/*' />
|
||||
// This interface is used by types that want full control over the
|
||||
// binary serialization format.
|
||||
public interface IBinarySerialize
|
||||
{
|
||||
/// <include file='../../../../../../../doc/snippets/Microsoft.Data.SqlClient.Server/IBinarySerialize.xml' path='docs/members[@name="IBinarySerialize"]/Read/*' />
|
||||
// Read from the specified binary reader.
|
||||
void Read(BinaryReader r);
|
||||
/// <include file='../../../../../../../doc/snippets/Microsoft.Data.SqlClient.Server/IBinarySerialize.xml' path='docs/members[@name="IBinarySerialize"]/Write/*' />
|
||||
// Write to the specified binary writer.
|
||||
void Write(BinaryWriter w);
|
||||
}
|
||||
}
|
|
@ -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
|
||||
{
|
||||
/// <include file='../../../../../../../doc/snippets/Microsoft.Data.SqlClient.Server/InvalidUdtException.xml' path='docs/members[@name="InvalidUdtException"]/InvalidUdtException/*' />
|
||||
[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)
|
||||
{
|
||||
}
|
||||
|
||||
/// <include file='../../../../../../../doc/snippets/Microsoft.Data.SqlClient.Server/InvalidUdtException.xml' path='docs/members[@name="InvalidUdtException"]/GetObjectData/*' />
|
||||
[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;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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
|
||||
{
|
||||
/// <include file='../../../../../../../doc/snippets/Microsoft.Data.SqlClient.Server/SqlFacetAttribute.xml' path='docs/members[@name="SqlFacetAttribute"]/SqlFacetAttribute/*' />
|
||||
[AttributeUsage(AttributeTargets.Field | AttributeTargets.Property | AttributeTargets.ReturnValue | AttributeTargets.Parameter, AllowMultiple = false, Inherited = false)]
|
||||
public class SqlFacetAttribute : Attribute
|
||||
{
|
||||
/// <include file='../../../../../../../doc/snippets/Microsoft.Data.SqlClient.Server/SqlFacetAttribute.xml' path='docs/members[@name="SqlFacetAttribute"]/ctor/*'/>
|
||||
public SqlFacetAttribute() { }
|
||||
|
||||
/// <include file='../../../../../../../doc/snippets/Microsoft.Data.SqlClient.Server/SqlFacetAttribute.xml' path='docs/members[@name="SqlFacetAttribute"]/IsFixedLength/*' />
|
||||
public bool IsFixedLength
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <include file='../../../../../../../doc/snippets/Microsoft.Data.SqlClient.Server/SqlFacetAttribute.xml' path='docs/members[@name="SqlFacetAttribute"]/MaxSize/*' />
|
||||
public int MaxSize
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <include file='../../../../../../../doc/snippets/Microsoft.Data.SqlClient.Server/SqlFacetAttribute.xml' path='docs/members[@name="SqlFacetAttribute"]/Precision/*' />
|
||||
public int Precision
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <include file='../../../../../../../doc/snippets/Microsoft.Data.SqlClient.Server/SqlFacetAttribute.xml' path='docs/members[@name="SqlFacetAttribute"]/Scale/*' />
|
||||
public int Scale
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <include file='../../../../../../../doc/snippets/Microsoft.Data.SqlClient.Server/SqlFacetAttribute.xml' path='docs/members[@name="SqlFacetAttribute"]/IsNullable/*' />
|
||||
public bool IsNullable
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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
|
||||
{
|
||||
/// <include file='../../../../../../../doc/snippets/Microsoft.Data.SqlClient.Server/DataAccessKind.xml' path='docs/members[@name="DataAccessKind"]/DataAccessKind/*' />
|
||||
[Serializable]
|
||||
public enum DataAccessKind
|
||||
{
|
||||
/// <include file='../../../../../../../doc/snippets/Microsoft.Data.SqlClient.Server/DataAccessKind.xml' path='docs/members[@name="DataAccessKind"]/None/*' />
|
||||
None = 0,
|
||||
/// <include file='../../../../../../../doc/snippets/Microsoft.Data.SqlClient.Server/DataAccessKind.xml' path='docs/members[@name="DataAccessKind"]/Read/*' />
|
||||
Read = 1,
|
||||
}
|
||||
|
||||
/// <include file='../../../../../../../doc/snippets/Microsoft.Data.SqlClient.Server/SystemDataAccessKind.xml' path='docs/members[@name="SystemDataAccessKind"]/SystemDataAccessKind/*' />
|
||||
[Serializable]
|
||||
public enum SystemDataAccessKind
|
||||
{
|
||||
/// <include file='../../../../../../../doc/snippets/Microsoft.Data.SqlClient.Server/SystemDataAccessKind.xml' path='docs/members[@name="SystemDataAccessKind"]/None/*' />
|
||||
None = 0,
|
||||
/// <include file='../../../../../../../doc/snippets/Microsoft.Data.SqlClient.Server/SystemDataAccessKind.xml' path='docs/members[@name="SystemDataAccessKind"]/Read/*' />
|
||||
Read = 1,
|
||||
}
|
||||
|
||||
/// <include file='../../../../../../../doc/snippets/Microsoft.Data.SqlClient.Server/SqlFunctionAttribute.xml' path='docs/members[@name="SqlFunctionAttribute"]/SqlFunctionAttribute/*' />
|
||||
// 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;
|
||||
|
||||
/// <include file='../../../../../../../doc/snippets/Microsoft.Data.SqlClient.Server/SqlFunctionAttribute.xml' path='docs/members[@name="SqlFunctionAttribute"]/ctor/*' />
|
||||
public SqlFunctionAttribute()
|
||||
{
|
||||
// default values
|
||||
_isDeterministic = false;
|
||||
_dataAccess = DataAccessKind.None;
|
||||
_systemDataAccess = SystemDataAccessKind.None;
|
||||
_isPrecise = false;
|
||||
_name = null;
|
||||
_tableDefinition = null;
|
||||
_fillRowMethodName = null;
|
||||
}
|
||||
|
||||
/// <include file='../../../../../../../doc/snippets/Microsoft.Data.SqlClient.Server/SqlFunctionAttribute.xml' path='docs/members[@name="SqlFunctionAttribute"]/IsDeterministic/*' />
|
||||
public bool IsDeterministic
|
||||
{
|
||||
get => _isDeterministic;
|
||||
set => _isDeterministic = value;
|
||||
}
|
||||
|
||||
/// <include file='../../../../../../../doc/snippets/Microsoft.Data.SqlClient.Server/SqlFunctionAttribute.xml' path='docs/members[@name="SqlFunctionAttribute"]/DataAccess/*' />
|
||||
public DataAccessKind DataAccess
|
||||
{
|
||||
get => _dataAccess;
|
||||
set => _dataAccess = value;
|
||||
}
|
||||
|
||||
/// <include file='../../../../../../../doc/snippets/Microsoft.Data.SqlClient.Server/SqlFunctionAttribute.xml' path='docs/members[@name="SqlFunctionAttribute"]/SystemDataAccess/*' />
|
||||
public SystemDataAccessKind SystemDataAccess
|
||||
{
|
||||
get => _systemDataAccess;
|
||||
set => _systemDataAccess = value;
|
||||
}
|
||||
|
||||
/// <include file='../../../../../../../doc/snippets/Microsoft.Data.SqlClient.Server/SqlFunctionAttribute.xml' path='docs/members[@name="SqlFunctionAttribute"]/IsPrecise/*' />
|
||||
public bool IsPrecise
|
||||
{
|
||||
get => _isPrecise;
|
||||
set => _isPrecise = value;
|
||||
}
|
||||
|
||||
/// <include file='../../../../../../../doc/snippets/Microsoft.Data.SqlClient.Server/SqlFunctionAttribute.xml' path='docs/members[@name="SqlFunctionAttribute"]/Name/*' />
|
||||
public string Name
|
||||
{
|
||||
get => _name;
|
||||
set => _name = value;
|
||||
}
|
||||
|
||||
/// <include file='../../../../../../../doc/snippets/Microsoft.Data.SqlClient.Server/SqlFunctionAttribute.xml' path='docs/members[@name="SqlFunctionAttribute"]/TableDefinition/*' />
|
||||
public string TableDefinition
|
||||
{
|
||||
get => _tableDefinition;
|
||||
set => _tableDefinition = value;
|
||||
}
|
||||
|
||||
/// <include file='../../../../../../../doc/snippets/Microsoft.Data.SqlClient.Server/SqlFunctionAttribute.xml' path='docs/members[@name="SqlFunctionAttribute"]/FillRowMethodName/*' />
|
||||
public string FillRowMethodName
|
||||
{
|
||||
get => _fillRowMethodName;
|
||||
set => _fillRowMethodName = value;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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
|
||||
{
|
||||
/// <include file='../../../../../../../doc/snippets/Microsoft.Data.SqlClient.Server/SqlMethodAttribute.xml' path='docs/members[@name="SqlMethodAttribute"]/SqlMethodAttribute/*' />
|
||||
[AttributeUsage(AttributeTargets.Method, AllowMultiple = false, Inherited = false), Serializable]
|
||||
public sealed class SqlMethodAttribute : SqlFunctionAttribute
|
||||
{
|
||||
private bool _isCalledOnNullInputs;
|
||||
private bool _isMutator;
|
||||
private bool _shouldInvokeIfReceiverIsNull;
|
||||
|
||||
/// <include file='../../../../../../../doc/snippets/Microsoft.Data.SqlClient.Server/SqlMethodAttribute.xml' path='docs/members[@name="SqlMethodAttribute"]/ctor/*' />
|
||||
public SqlMethodAttribute()
|
||||
{
|
||||
// default values
|
||||
_isCalledOnNullInputs = true;
|
||||
_isMutator = false;
|
||||
_shouldInvokeIfReceiverIsNull = false;
|
||||
}
|
||||
|
||||
/// <include file='../../../../../../../doc/snippets/Microsoft.Data.SqlClient.Server/SqlMethodAttribute.xml' path='docs/members[@name="SqlMethodAttribute"]/OnNullCall/*' />
|
||||
public bool OnNullCall
|
||||
{
|
||||
get => _isCalledOnNullInputs;
|
||||
set => _isCalledOnNullInputs = value;
|
||||
}
|
||||
|
||||
/// <include file='../../../../../../../doc/snippets/Microsoft.Data.SqlClient.Server/SqlMethodAttribute.xml' path='docs/members[@name="SqlMethodAttribute"]/IsMutator/*' />
|
||||
public bool IsMutator
|
||||
{
|
||||
get => _isMutator;
|
||||
set => _isMutator = value;
|
||||
}
|
||||
|
||||
/// <include file='../../../../../../../doc/snippets/Microsoft.Data.SqlClient.Server/SqlMethodAttribute.xml' path='docs/members[@name="SqlMethodAttribute"]/InvokeIfReceiverIsNull/*' />
|
||||
public bool InvokeIfReceiverIsNull
|
||||
{
|
||||
get => _shouldInvokeIfReceiverIsNull;
|
||||
set => _shouldInvokeIfReceiverIsNull = value;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -7,9 +7,7 @@ using System.Collections.Concurrent;
|
|||
using System.IO;
|
||||
using System.Runtime.CompilerServices;
|
||||
using Microsoft.Data.Common;
|
||||
#if NETFRAMEWORK
|
||||
using Microsoft.SqlServer.Server;
|
||||
#endif
|
||||
|
||||
namespace Microsoft.Data.SqlClient.Server
|
||||
{
|
||||
|
|
|
@ -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
|
||||
{
|
||||
/// <include file='../../../../../../../doc/snippets/Microsoft.Data.SqlClient.Server/SqlUserDefinedAggregateAttribute.xml' path='docs/members[@name="SqlUserDefinedAggregateAttribute"]/SqlUserDefinedAggregateAttribute/*' />
|
||||
[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;
|
||||
|
||||
/// <include file='../../../../../../../doc/snippets/Microsoft.Data.SqlClient.Server/SqlUserDefinedAggregateAttribute.xml' path='docs/members[@name="SqlUserDefinedAggregateAttribute"]/MaxByteSizeValue/*' />
|
||||
// The maximum value for the maxbytesize field, in bytes.
|
||||
public const int MaxByteSizeValue = 8000;
|
||||
|
||||
/// <include file='../../../../../../../doc/snippets/Microsoft.Data.SqlClient.Server/SqlUserDefinedAggregateAttribute.xml' path='docs/members[@name="SqlUserDefinedAggregateAttribute"]/ctor/*' />
|
||||
// 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);
|
||||
}
|
||||
}
|
||||
|
||||
/// <include file='../../../../../../../doc/snippets/Microsoft.Data.SqlClient.Server/SqlUserDefinedAggregateAttribute.xml' path='docs/members[@name="SqlUserDefinedAggregateAttribute"]/MaxByteSize/*' />
|
||||
// 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;
|
||||
}
|
||||
}
|
||||
|
||||
/// <include file='../../../../../../../doc/snippets/Microsoft.Data.SqlClient.Server/SqlUserDefinedAggregateAttribute.xml' path='docs/members[@name="SqlUserDefinedAggregateAttribute"]/IsInvariantToDuplicates/*' />
|
||||
public bool IsInvariantToDuplicates
|
||||
{
|
||||
get
|
||||
{
|
||||
return _isInvariantToDup;
|
||||
}
|
||||
set
|
||||
{
|
||||
_isInvariantToDup = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <include file='../../../../../../../doc/snippets/Microsoft.Data.SqlClient.Server/SqlUserDefinedAggregateAttribute.xml' path='docs/members[@name="SqlUserDefinedAggregateAttribute"]/IsInvariantToNulls/*' />
|
||||
public bool IsInvariantToNulls
|
||||
{
|
||||
get
|
||||
{
|
||||
return _isInvariantToNulls;
|
||||
}
|
||||
set
|
||||
{
|
||||
_isInvariantToNulls = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <include file='../../../../../../../doc/snippets/Microsoft.Data.SqlClient.Server/SqlUserDefinedAggregateAttribute.xml' path='docs/members[@name="SqlUserDefinedAggregateAttribute"]/IsInvariantToOrder/*' />
|
||||
public bool IsInvariantToOrder
|
||||
{
|
||||
get
|
||||
{
|
||||
return _isInvariantToOrder;
|
||||
}
|
||||
set
|
||||
{
|
||||
_isInvariantToOrder = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <include file='../../../../../../../doc/snippets/Microsoft.Data.SqlClient.Server/SqlUserDefinedAggregateAttribute.xml' path='docs/members[@name="SqlUserDefinedAggregateAttribute"]/IsNullIfEmpty/*' />
|
||||
public bool IsNullIfEmpty
|
||||
{
|
||||
get
|
||||
{
|
||||
return _isNullIfEmpty;
|
||||
}
|
||||
set
|
||||
{
|
||||
_isNullIfEmpty = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <include file='../../../../../../../doc/snippets/Microsoft.Data.SqlClient.Server/SqlUserDefinedAggregateAttribute.xml' path='docs/members[@name="SqlUserDefinedAggregateAttribute"]/Format/*' />
|
||||
// The on-disk format for this type.
|
||||
public Format Format => _format;
|
||||
|
||||
/// <include file='../../../../../../../doc/snippets/Microsoft.Data.SqlClient.Server/SqlUserDefinedAggregateAttribute.xml' path='docs/members[@name="SqlUserDefinedAggregateAttribute"]/Name/*' />
|
||||
public string Name
|
||||
{
|
||||
get
|
||||
{
|
||||
return _name;
|
||||
}
|
||||
set
|
||||
{
|
||||
_name = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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
|
||||
{
|
||||
/// <include file='../../../../../../../doc/snippets/Microsoft.Data.SqlClient.Server/Format.xml' path='docs/members[@name="Format"]/Format/*' />
|
||||
public enum Format
|
||||
{
|
||||
/// <include file='../../../../../../../doc/snippets/Microsoft.Data.SqlClient.Server/Format.xml' path='docs/members[@name="Format"]/Unknown/*' />
|
||||
Unknown = 0,
|
||||
/// <include file='../../../../../../../doc/snippets/Microsoft.Data.SqlClient.Server/Format.xml' path='docs/members[@name="Format"]/Native/*' />
|
||||
Native = 1,
|
||||
/// <include file='../../../../../../../doc/snippets/Microsoft.Data.SqlClient.Server/Format.xml' path='docs/members[@name="Format"]/UserDefined/*' />
|
||||
UserDefined = 2,
|
||||
}
|
||||
|
||||
/// <include file='../../../../../../../doc/snippets/Microsoft.Data.SqlClient.Server/SqlUserDefinedTypeAttribute.xml' path='docs/members[@name="SqlUserDefinedTypeAttribute"]/SqlUserDefinedTypeAttribute/*' />
|
||||
// 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;
|
||||
|
||||
/// <include file='../../../../../../../doc/snippets/Microsoft.Data.SqlClient.Server/SqlUserDefinedTypeAttribute.xml' path='docs/members[@name="SqlUserDefinedTypeAttribute"]/ctor/*' />
|
||||
// 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);
|
||||
}
|
||||
}
|
||||
|
||||
/// <include file='../../../../../../../doc/snippets/Microsoft.Data.SqlClient.Server/SqlUserDefinedTypeAttribute.xml' path='docs/members[@name="SqlUserDefinedTypeAttribute"]/MaxByteSize/*' />
|
||||
// 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;
|
||||
}
|
||||
}
|
||||
|
||||
/// <include file='../../../../../../../doc/snippets/Microsoft.Data.SqlClient.Server/SqlUserDefinedTypeAttribute.xml' path='docs/members[@name="SqlUserDefinedTypeAttribute"]/IsFixedLength/*' />
|
||||
// Are all instances of this udt the same size on disk?
|
||||
public bool IsFixedLength
|
||||
{
|
||||
get
|
||||
{
|
||||
return _isFixedLength;
|
||||
}
|
||||
set
|
||||
{
|
||||
_isFixedLength = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <include file='../../../../../../../doc/snippets/Microsoft.Data.SqlClient.Server/SqlUserDefinedTypeAttribute.xml' path='docs/members[@name="SqlUserDefinedTypeAttribute"]/IsByteOrdered/*' />
|
||||
// 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;
|
||||
}
|
||||
}
|
||||
|
||||
/// <include file='../../../../../../../doc/snippets/Microsoft.Data.SqlClient.Server/SqlUserDefinedTypeAttribute.xml' path='docs/members[@name="SqlUserDefinedTypeAttribute"]/Format/*' />
|
||||
// The on-disk format for this type.
|
||||
public Format Format => _format;
|
||||
|
||||
/// <include file='../../../../../../../doc/snippets/Microsoft.Data.SqlClient.Server/SqlUserDefinedTypeAttribute.xml' path='docs/members[@name="SqlUserDefinedTypeAttribute"]/ValidationMethodName/*' />
|
||||
// An Optional method used to validate this UDT
|
||||
public string ValidationMethodName
|
||||
{
|
||||
get
|
||||
{
|
||||
return _validationMethodName;
|
||||
}
|
||||
set
|
||||
{
|
||||
_validationMethodName = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <include file='../../../../../../../doc/snippets/Microsoft.Data.SqlClient.Server/SqlUserDefinedTypeAttribute.xml' path='docs/members[@name="SqlUserDefinedTypeAttribute"]/Name/*' />
|
||||
public string Name
|
||||
{
|
||||
get
|
||||
{
|
||||
return _name;
|
||||
}
|
||||
set
|
||||
{
|
||||
_name = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -15,10 +15,7 @@ using System.Globalization;
|
|||
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
|
||||
{
|
||||
|
|
|
@ -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
|
||||
{
|
||||
|
|
|
@ -97,6 +97,7 @@
|
|||
<ProjectReference Condition="'$(TargetGroup)'=='netcoreapp' AND $(ReferenceType)=='Project'" Include="$(NetCoreSource)src\Microsoft.Data.SqlClient.csproj" />
|
||||
<ProjectReference Condition="'$(TargetGroup)'=='netfx' AND $(ReferenceType)=='Project'" Include="$(NetFxSource)src\Microsoft.Data.SqlClient.csproj" />
|
||||
<ProjectReference Condition="$(ReferenceType.Contains('NetStandard'))" Include="$(TestsPath)NSLibrary\Microsoft.Data.SqlClient.NSLibrary.csproj" />
|
||||
<ProjectReference Include="$(SqlServerSource)Microsoft.SqlServer.Server.csproj" />
|
||||
<PackageReference Condition="$(ReferenceType)=='Package'" Include="Microsoft.Data.SqlClient" Version="$(TestMicrosoftDataSqlClientVersion)" />
|
||||
<!-- .NET Core 3.1.2 known issue; It should be added manually! -->
|
||||
<!-- https://github.com/dotnet/core/blob/main/release-notes/3.1/3.1-known-issues.md#net-core-312-sdk-31102-sdk -->
|
||||
|
|
|
@ -390,10 +390,6 @@ namespace Microsoft.Data.SqlClient.Tests
|
|||
return GetEnumerator();
|
||||
}
|
||||
}
|
||||
#if NETFRAMEWORK
|
||||
[SqlServer.Server.SqlUserDefinedType(SqlServer.Server.Format.UserDefined)]
|
||||
#else
|
||||
[SqlUserDefinedType(Format.UserDefined)]
|
||||
#endif
|
||||
public class TestUdt {}
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -511,6 +511,11 @@ namespace Microsoft.Data.SqlClient.Tests
|
|||
[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 @@ namespace Microsoft.Data.SqlClient.Tests
|
|||
[Fact]
|
||||
public static void InvalidUdtEcxeption_Throws()
|
||||
{
|
||||
var e = Assert.Throws
|
||||
#if NETFRAMEWORK
|
||||
<SqlServer.Server.InvalidUdtException>
|
||||
#else
|
||||
<Server.InvalidUdtException>
|
||||
#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<SqlServer.Server.InvalidUdtException> (() => 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]
|
||||
|
|
|
@ -302,6 +302,7 @@
|
|||
<ProjectReference Condition="'$(TargetGroup)'=='netcoreapp' AND $(ReferenceType)=='Project'" Include="$(NetCoreSource)src\Microsoft.Data.SqlClient.csproj" />
|
||||
<ProjectReference Condition="'$(TargetGroup)'=='netfx' AND $(ReferenceType)=='Project'" Include="$(NetFxSource)src\Microsoft.Data.SqlClient.csproj" />
|
||||
<ProjectReference Condition="$(ReferenceType.Contains('NetStandard'))" Include="$(TestsPath)NSLibrary\Microsoft.Data.SqlClient.NSLibrary.csproj" />
|
||||
<ProjectReference Include="$(SqlServerSource)Microsoft.SqlServer.Server.csproj" />
|
||||
<PackageReference Condition="$(ReferenceType)=='Package'" Include="Microsoft.Data.SqlClient" Version="$(TestMicrosoftDataSqlClientVersion)" />
|
||||
<ProjectReference Include="$(TestsPath)CustomConfigurableRetryLogic\CustomRetryLogicProvider.csproj" />
|
||||
</ItemGroup>
|
||||
|
@ -320,7 +321,6 @@
|
|||
<PackageReference Include="System.Net.Sockets" Version="$(SystemNetSocketsVersion)" />
|
||||
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="$(SystemIdentityModelTokensJwtVersion)" />
|
||||
<PackageReference Condition="'$(TargetGroup)'=='netfx'" Include="Microsoft.SqlServer.Types" Version="$(MicrosoftSqlServerTypesVersion)" />
|
||||
<PackageReference Condition="'$(TargetGroup)'=='netcoreapp' AND $(OS)=='Unix'" Include="Microsoft.Windows.Compatibility" Version="$(MicrosoftWindowsCompatibilityVersion)" />
|
||||
<PackageReference Condition="'$(TargetGroup)'=='netcoreapp'" Include="Microsoft.DotNet.RemoteExecutor" Version="$(MicrosoftDotnetRemoteExecutorVersion)" />
|
||||
<PackageReference Condition="'$(TargetGroup)'!='netfx'" Include="System.ServiceProcess.ServiceController" Version="$(SystemServiceProcessServiceControllerVersion)" />
|
||||
</ItemGroup>
|
||||
|
|
|
@ -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)]
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
<ProjectReference Condition="'$(TargetGroup)'=='netcoreapp' AND $(ReferenceType)=='Project'" Include="$(NetCoreSource)src\Microsoft.Data.SqlClient.csproj" />
|
||||
<ProjectReference Condition="'$(TargetGroup)'=='netfx' AND $(ReferenceType)=='Project'" Include="$(NetFxSource)src\Microsoft.Data.SqlClient.csproj" />
|
||||
<ProjectReference Condition="$(ReferenceType.Contains('NetStandard'))" Include="$(TestsPath)NSLibrary\Microsoft.Data.SqlClient.NSLibrary.csproj" />
|
||||
<ProjectReference Include="$(SqlServerSource)Microsoft.SqlServer.Server.csproj" />
|
||||
<PackageReference Condition="$(ReferenceType)=='Package'" Include="Microsoft.Data.SqlClient" Version="$(TestMicrosoftDataSqlClientVersion)" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
</Project>
|
||||
|
|
|
@ -6,11 +6,7 @@ using System;
|
|||
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)]
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
<ProjectReference Condition="'$(TargetGroup)'=='netcoreapp' AND $(ReferenceType)=='Project'" Include="$(NetCoreSource)src\Microsoft.Data.SqlClient.csproj" />
|
||||
<ProjectReference Condition="'$(TargetGroup)'=='netfx' AND $(ReferenceType)=='Project'" Include="$(NetFxSource)src\Microsoft.Data.SqlClient.csproj" />
|
||||
<ProjectReference Condition="$(ReferenceType.Contains('NetStandard'))" Include="$(TestsPath)NSLibrary\Microsoft.Data.SqlClient.NSLibrary.csproj" />
|
||||
<ProjectReference Include="$(SqlServerSource)Microsoft.SqlServer.Server.csproj" />
|
||||
<PackageReference Condition="$(ReferenceType)=='Package'" Include="Microsoft.Data.SqlClient" Version="$(TestMicrosoftDataSqlClientVersion)" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
</Project>
|
||||
|
|
|
@ -6,11 +6,7 @@ using System;
|
|||
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)]
|
||||
|
|
|
@ -6,11 +6,7 @@ using System;
|
|||
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)]
|
||||
|
|
|
@ -6,11 +6,7 @@ using System;
|
|||
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)]
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
<ProjectReference Condition="'$(TargetGroup)'=='netcoreapp' AND $(ReferenceType)=='Project'" Include="$(NetCoreSource)src\Microsoft.Data.SqlClient.csproj" />
|
||||
<ProjectReference Condition="'$(TargetGroup)'=='netfx' AND $(ReferenceType)=='Project'" Include="$(NetFxSource)src\Microsoft.Data.SqlClient.csproj" />
|
||||
<ProjectReference Condition="$(ReferenceType.Contains('NetStandard'))" Include="$(TestsPath)NSLibrary\Microsoft.Data.SqlClient.NSLibrary.csproj" />
|
||||
<ProjectReference Include="$(SqlServerSource)Microsoft.SqlServer.Server.csproj" />
|
||||
<PackageReference Condition="$(ReferenceType)=='Package'" Include="Microsoft.Data.SqlClient" Version="$(TestMicrosoftDataSqlClientVersion)" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
</Project>
|
||||
|
|
|
@ -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
|
||||
{
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
<ProjectReference Condition="'$(TargetGroup)'=='netcoreapp' AND $(ReferenceType)=='Project'" Include="$(NetCoreSource)src\Microsoft.Data.SqlClient.csproj" />
|
||||
<ProjectReference Condition="'$(TargetGroup)'=='netfx' AND $(ReferenceType)=='Project'" Include="$(NetFxSource)src\Microsoft.Data.SqlClient.csproj" />
|
||||
<ProjectReference Condition="$(ReferenceType.Contains('NetStandard'))" Include="$(TestsPath)NSLibrary\Microsoft.Data.SqlClient.NSLibrary.csproj" />
|
||||
<ProjectReference Include="$(SqlServerSource)Microsoft.SqlServer.Server.csproj" />
|
||||
<PackageReference Condition="$(ReferenceType)=='Package'" Include="Microsoft.Data.SqlClient" Version="$(TestMicrosoftDataSqlClientVersion)" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
</Project>
|
||||
|
|
|
@ -6,12 +6,8 @@ using System;
|
|||
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 @@ namespace Microsoft.Data.SqlClient.ManualTesting.Tests
|
|||
public void TestSqlUserDefinedAggregateAttributeMaxByteSize()
|
||||
{
|
||||
Func<int, SqlUserDefinedAggregateAttribute> create
|
||||
= (size) => new SqlUserDefinedAggregateAttribute(Format.UserDefined) { MaxByteSize = size };
|
||||
= (size) => new(Format.UserDefined) { MaxByteSize = size };
|
||||
|
||||
SqlUserDefinedAggregateAttribute attribute1 = create(-1);
|
||||
SqlUserDefinedAggregateAttribute attribute2 = create(0);
|
||||
|
|
|
@ -64,7 +64,6 @@
|
|||
<MicrosoftDotNetPlatformAbstractionsVersion>3.1.1</MicrosoftDotNetPlatformAbstractionsVersion>
|
||||
<MicrosoftIdentityModelClientsActiveDirectoryVersion>5.2.6</MicrosoftIdentityModelClientsActiveDirectoryVersion>
|
||||
<MicrosoftNETTestSdkVersion>15.9.0</MicrosoftNETTestSdkVersion>
|
||||
<MicrosoftWindowsCompatibilityVersion>3.1.0</MicrosoftWindowsCompatibilityVersion>
|
||||
<NewtonsoftJsonVersion>13.0.1</NewtonsoftJsonVersion>
|
||||
<SystemRuntimeInteropServicesRuntimeInformationVersion>4.3.0</SystemRuntimeInteropServicesRuntimeInformationVersion>
|
||||
<SystemLinqExpressionsVersion>4.3.0</SystemLinqExpressionsVersion>
|
||||
|
|
|
@ -47,6 +47,7 @@ When using NuGet 3.x this package requires at least version 3.4.</description>
|
|||
<dependency id="Microsoft.Identity.Client" version="4.43.2" exclude="Compile"/>
|
||||
<dependency id="Microsoft.IdentityModel.Protocols.OpenIdConnect" version="6.8.0" />
|
||||
<dependency id="Microsoft.IdentityModel.JsonWebTokens" version="6.8.0" />
|
||||
<dependency id="Microsoft.SqlServer.Server" version="1.0.0"/>
|
||||
<dependency id="Microsoft.Win32.Registry" version="5.0.0" exclude="Compile" />
|
||||
<dependency id="System.Buffers" version="4.5.1" />
|
||||
<dependency id="System.Configuration.ConfigurationManager" version="5.0.0" exclude="Compile" />
|
||||
|
@ -65,6 +66,7 @@ When using NuGet 3.x this package requires at least version 3.4.</description>
|
|||
<dependency id="Microsoft.Identity.Client" version="4.43.2" exclude="Compile"/>
|
||||
<dependency id="Microsoft.IdentityModel.Protocols.OpenIdConnect" version="6.8.0" />
|
||||
<dependency id="Microsoft.IdentityModel.JsonWebTokens" version="6.8.0" />
|
||||
<dependency id="Microsoft.SqlServer.Server" version="1.0.0"/>
|
||||
<dependency id="Microsoft.Win32.Registry" version="5.0.0" exclude="Compile" />
|
||||
<dependency id="System.Buffers" version="4.5.1" />
|
||||
<dependency id="System.Configuration.ConfigurationManager" version="5.0.0" exclude="Compile" />
|
||||
|
@ -83,6 +85,7 @@ When using NuGet 3.x this package requires at least version 3.4.</description>
|
|||
<dependency id="Microsoft.Identity.Client" version="4.43.2" exclude="Compile"/>
|
||||
<dependency id="Microsoft.IdentityModel.Protocols.OpenIdConnect" version="6.8.0" />
|
||||
<dependency id="Microsoft.IdentityModel.JsonWebTokens" version="6.8.0" />
|
||||
<dependency id="Microsoft.SqlServer.Server" version="1.0.0"/>
|
||||
<dependency id="Microsoft.Win32.Registry" version="5.0.0" exclude="Compile" />
|
||||
<dependency id="System.Buffers" version="4.5.1" />
|
||||
<dependency id="System.Configuration.ConfigurationManager" version="5.0.0" exclude="Compile" />
|
||||
|
|
Загрузка…
Ссылка в новой задаче