You've already forked linux-packaging-mono
Imported Upstream version 5.10.0.69
Former-commit-id: fc39669a0b707dd3c063977486506b6793da2890
This commit is contained in:
parent
d8f8abd549
commit
e2950ec768
@@ -7,6 +7,26 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "System.Data.SqlClient.Tests
|
||||
{D4550556-4745-457F-BA8F-3EBF3836D6B4} = {D4550556-4745-457F-BA8F-3EBF3836D6B4}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Address", "tests\ManualTests\SQL\UdtTest\UDTs\Address\Address.csproj", "{D1392B54-998A-4F27-BC17-4CE149117BCC}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{D4550556-4745-457F-BA8F-3EBF3836D6B4} = {D4550556-4745-457F-BA8F-3EBF3836D6B4}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Circle", "tests\ManualTests\SQL\UdtTest\UDTs\Circle\Circle.csproj", "{6C88F00F-9597-43AD-9E5F-9B344DA3B16F}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{D4550556-4745-457F-BA8F-3EBF3836D6B4} = {D4550556-4745-457F-BA8F-3EBF3836D6B4}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Shapes", "tests\ManualTests\SQL\UdtTest\UDTs\Shapes\Shapes.csproj", "{B73A7063-37C3-415D-AD53-BB3DA20ABD6E}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{D4550556-4745-457F-BA8F-3EBF3836D6B4} = {D4550556-4745-457F-BA8F-3EBF3836D6B4}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Utf8String", "tests\ManualTests\SQL\UdtTest\UDTs\Utf8String\Utf8String.csproj", "{E0A6BB21-574B-43D9-890D-6E1144F2EE9E}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{D4550556-4745-457F-BA8F-3EBF3836D6B4} = {D4550556-4745-457F-BA8F-3EBF3836D6B4}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "System.Data.SqlClient.ManualTesting.Tests", "tests\ManualTests\System.Data.SqlClient.ManualTesting.Tests.csproj", "{45DB5F86-7AE3-45C6-870D-F9357B66BDB5}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{D4550556-4745-457F-BA8F-3EBF3836D6B4} = {D4550556-4745-457F-BA8F-3EBF3836D6B4}
|
||||
@@ -70,6 +90,22 @@ Global
|
||||
{F3E72F35-0351-4D67-9388-725BCAD807BA}.Debug|Any CPU.Build.0 = netstandard-Windows_NT-Debug|Any CPU
|
||||
{F3E72F35-0351-4D67-9388-725BCAD807BA}.Release|Any CPU.ActiveCfg = netstandard-Windows_NT-Release|Any CPU
|
||||
{F3E72F35-0351-4D67-9388-725BCAD807BA}.Release|Any CPU.Build.0 = netstandard-Windows_NT-Release|Any CPU
|
||||
{D1392B54-998A-4F27-BC17-4CE149117BCC}.Debug|Any CPU.ActiveCfg = netstandard-Debug|Any CPU
|
||||
{D1392B54-998A-4F27-BC17-4CE149117BCC}.Debug|Any CPU.Build.0 = netstandard-Debug|Any CPU
|
||||
{D1392B54-998A-4F27-BC17-4CE149117BCC}.Release|Any CPU.ActiveCfg = netstandard-Release|Any CPU
|
||||
{D1392B54-998A-4F27-BC17-4CE149117BCC}.Release|Any CPU.Build.0 = netstandard-Release|Any CPU
|
||||
{6C88F00F-9597-43AD-9E5F-9B344DA3B16F}.Debug|Any CPU.ActiveCfg = netstandard-Debug|Any CPU
|
||||
{6C88F00F-9597-43AD-9E5F-9B344DA3B16F}.Debug|Any CPU.Build.0 = netstandard-Debug|Any CPU
|
||||
{6C88F00F-9597-43AD-9E5F-9B344DA3B16F}.Release|Any CPU.ActiveCfg = netstandard-Release|Any CPU
|
||||
{6C88F00F-9597-43AD-9E5F-9B344DA3B16F}.Release|Any CPU.Build.0 = netstandard-Release|Any CPU
|
||||
{B73A7063-37C3-415D-AD53-BB3DA20ABD6E}.Debug|Any CPU.ActiveCfg = netstandard-Debug|Any CPU
|
||||
{B73A7063-37C3-415D-AD53-BB3DA20ABD6E}.Debug|Any CPU.Build.0 = netstandard-Debug|Any CPU
|
||||
{B73A7063-37C3-415D-AD53-BB3DA20ABD6E}.Release|Any CPU.ActiveCfg = netstandard-Release|Any CPU
|
||||
{B73A7063-37C3-415D-AD53-BB3DA20ABD6E}.Release|Any CPU.Build.0 = netstandard-Release|Any CPU
|
||||
{E0A6BB21-574B-43D9-890D-6E1144F2EE9E}.Debug|Any CPU.ActiveCfg = netstandard-Debug|Any CPU
|
||||
{E0A6BB21-574B-43D9-890D-6E1144F2EE9E}.Debug|Any CPU.Build.0 = netstandard-Debug|Any CPU
|
||||
{E0A6BB21-574B-43D9-890D-6E1144F2EE9E}.Release|Any CPU.ActiveCfg = netstandard-Release|Any CPU
|
||||
{E0A6BB21-574B-43D9-890D-6E1144F2EE9E}.Release|Any CPU.Build.0 = netstandard-Release|Any CPU
|
||||
{45DB5F86-7AE3-45C6-870D-F9357B66BDB5}.Debug|Any CPU.ActiveCfg = netstandard-Debug|Any CPU
|
||||
{45DB5F86-7AE3-45C6-870D-F9357B66BDB5}.Debug|Any CPU.Build.0 = netstandard-Debug|Any CPU
|
||||
{45DB5F86-7AE3-45C6-870D-F9357B66BDB5}.Release|Any CPU.ActiveCfg = netstandard-Release|Any CPU
|
||||
@@ -116,6 +152,10 @@ Global
|
||||
EndGlobalSection
|
||||
GlobalSection(NestedProjects) = preSolution
|
||||
{F3E72F35-0351-4D67-9388-725BCAD807BA} = {1A2F9F4A-A032-433E-B914-ADD5992BB178}
|
||||
{D1392B54-998A-4F27-BC17-4CE149117BCC} = {1A2F9F4A-A032-433E-B914-ADD5992BB178}
|
||||
{6C88F00F-9597-43AD-9E5F-9B344DA3B16F} = {1A2F9F4A-A032-433E-B914-ADD5992BB178}
|
||||
{B73A7063-37C3-415D-AD53-BB3DA20ABD6E} = {1A2F9F4A-A032-433E-B914-ADD5992BB178}
|
||||
{E0A6BB21-574B-43D9-890D-6E1144F2EE9E} = {1A2F9F4A-A032-433E-B914-ADD5992BB178}
|
||||
{45DB5F86-7AE3-45C6-870D-F9357B66BDB5} = {1A2F9F4A-A032-433E-B914-ADD5992BB178}
|
||||
{AF78BA88-6428-47EA-8682-442DAF8E9656} = {1A2F9F4A-A032-433E-B914-ADD5992BB178}
|
||||
{B94B8E6D-3E41-4046-B758-4A2E281F74EE} = {1A2F9F4A-A032-433E-B914-ADD5992BB178}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="..\dir.props" />
|
||||
<PropertyGroup>
|
||||
<AssemblyVersion>4.3.0.0</AssemblyVersion>
|
||||
<AssemblyVersion>4.3.1.0</AssemblyVersion>
|
||||
<AssemblyKey>MSFT</AssemblyKey>
|
||||
<IsUAP>true</IsUAP>
|
||||
</PropertyGroup>
|
||||
|
||||
@@ -21,12 +21,7 @@
|
||||
<HarvestIncludePaths Include="runtimes/unix/lib/netstandard1.3;runtimes/win/lib/netstandard1.3" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<InboxOnTargetFramework Include="MonoAndroid10" />
|
||||
<InboxOnTargetFramework Include="MonoTouch10" />
|
||||
<InboxOnTargetFramework Include="xamarinios10" />
|
||||
<InboxOnTargetFramework Include="xamarinmac20" />
|
||||
<InboxOnTargetFramework Include="xamarintvos10" />
|
||||
<InboxOnTargetFramework Include="xamarinwatchos10" />
|
||||
<InboxOnTargetFramework Include="$(AllXamarinFrameworks)" />
|
||||
</ItemGroup>
|
||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
|
||||
</Project>
|
||||
@@ -32,6 +32,10 @@
|
||||
|
||||
namespace Microsoft.SqlServer.Server
|
||||
{
|
||||
public sealed partial class InvalidUdtException : System.SystemException
|
||||
{
|
||||
internal InvalidUdtException() { }
|
||||
}
|
||||
public partial class SqlDataRecord : System.Data.IDataRecord
|
||||
{
|
||||
public SqlDataRecord(params Microsoft.SqlServer.Server.SqlMetaData[] metaData) { }
|
||||
@@ -118,6 +122,28 @@ namespace Microsoft.SqlServer.Server
|
||||
public virtual void SetValue(int ordinal, object value) { }
|
||||
public virtual int SetValues(params object[] values) { throw null; }
|
||||
}
|
||||
public enum DataAccessKind
|
||||
{
|
||||
None = 0,
|
||||
Read = 1
|
||||
}
|
||||
public enum SystemDataAccessKind
|
||||
{
|
||||
None = 0,
|
||||
Read = 1
|
||||
}
|
||||
[System.AttributeUsage(System.AttributeTargets.Method, AllowMultiple = false, Inherited = false), System.SerializableAttribute]
|
||||
public partial class SqlFunctionAttribute : System.Attribute
|
||||
{
|
||||
public SqlFunctionAttribute() { }
|
||||
public bool IsDeterministic { get { throw null; } set { } }
|
||||
public DataAccessKind DataAccess { get { throw null; } set { } }
|
||||
public SystemDataAccessKind SystemDataAccess { get { throw null; } set { } }
|
||||
public bool IsPrecise { get { throw null; } set { } }
|
||||
public string Name { get { throw null; } set { } }
|
||||
public string TableDefinition { get { throw null; } set { } }
|
||||
public string FillRowMethodName { get { throw null; } set { } }
|
||||
}
|
||||
public sealed partial class SqlMetaData
|
||||
{
|
||||
public SqlMetaData(string name, System.Data.SqlDbType dbType) { }
|
||||
@@ -183,6 +209,49 @@ namespace Microsoft.SqlServer.Server
|
||||
public System.TimeSpan Adjust(System.TimeSpan value) { throw null; }
|
||||
public static Microsoft.SqlServer.Server.SqlMetaData InferFromValue(object value, string name) { throw null; }
|
||||
}
|
||||
[System.AttributeUsage(System.AttributeTargets.Method, AllowMultiple = false, Inherited = false), System.SerializableAttribute]
|
||||
public sealed partial class SqlMethodAttribute : SqlFunctionAttribute
|
||||
{
|
||||
public SqlMethodAttribute() { }
|
||||
public bool OnNullCall { get { throw null; } set { } }
|
||||
public bool IsMutator { get { throw null; } set { } }
|
||||
public bool InvokeIfReceiverIsNull { get { throw null; } set { } }
|
||||
}
|
||||
public enum Format
|
||||
{
|
||||
Unknown = 0,
|
||||
Native = 1,
|
||||
UserDefined = 2
|
||||
}
|
||||
[System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Struct, AllowMultiple = false, Inherited = false)]
|
||||
public sealed partial class SqlUserDefinedAggregateAttribute : System.Attribute
|
||||
{
|
||||
public const int MaxByteSizeValue = 8000;
|
||||
public SqlUserDefinedAggregateAttribute(Format format) { }
|
||||
public int MaxByteSize { get { throw null; } set { } }
|
||||
public bool IsInvariantToDuplicates { get { throw null; } set { } }
|
||||
public bool IsInvariantToNulls { get { throw null; } set { } }
|
||||
public bool IsInvariantToOrder { get { throw null; } set { } }
|
||||
public bool IsNullIfEmpty { get { throw null; } set { } }
|
||||
public Format Format { get { throw null; } }
|
||||
public string Name { get { throw null; } set { } }
|
||||
}
|
||||
[System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Struct, AllowMultiple = false, Inherited = true)]
|
||||
public sealed partial class SqlUserDefinedTypeAttribute : System.Attribute
|
||||
{
|
||||
public SqlUserDefinedTypeAttribute(Format format) { }
|
||||
public int MaxByteSize { get { throw null; } set { } }
|
||||
public bool IsFixedLength { get { throw null; } set { } }
|
||||
public bool IsByteOrdered { get { throw null; } set { } }
|
||||
public Format Format { get { throw null; } }
|
||||
public string ValidationMethodName { get { throw null; } set { } }
|
||||
public string Name { get { throw null; } set { } }
|
||||
}
|
||||
public interface IBinarySerialize
|
||||
{
|
||||
void Read(System.IO.BinaryReader r);
|
||||
void Write(System.IO.BinaryWriter w);
|
||||
}
|
||||
}
|
||||
namespace System.Data.Sql
|
||||
{
|
||||
@@ -333,6 +402,9 @@ namespace System.Data.SqlClient
|
||||
protected override System.Threading.Tasks.Task<System.Data.Common.DbDataReader> ExecuteDbDataReaderAsync(System.Data.CommandBehavior behavior, System.Threading.CancellationToken cancellationToken) { throw null; }
|
||||
public override int ExecuteNonQuery() { throw null; }
|
||||
public override System.Threading.Tasks.Task<int> ExecuteNonQueryAsync(System.Threading.CancellationToken cancellationToken) { throw null; }
|
||||
public IAsyncResult BeginExecuteNonQuery() { throw null; }
|
||||
public IAsyncResult BeginExecuteNonQuery(AsyncCallback callback, object stateObject) { throw null; }
|
||||
public int EndExecuteNonQuery(IAsyncResult asyncResult) { throw null; }
|
||||
public new System.Data.SqlClient.SqlDataReader ExecuteReader() { throw null; }
|
||||
public new System.Data.SqlClient.SqlDataReader ExecuteReader(System.Data.CommandBehavior behavior) { throw null; }
|
||||
public new System.Threading.Tasks.Task<System.Data.SqlClient.SqlDataReader> ExecuteReaderAsync() { throw null; }
|
||||
@@ -693,6 +765,7 @@ namespace System.Data.SqlClient
|
||||
public override DataRowVersion SourceVersion { get { throw null; } set { } }
|
||||
public System.Data.SqlDbType SqlDbType { get { throw null; } set { } }
|
||||
public object SqlValue { get { throw null; } set { } }
|
||||
public string UdtTypeName { get { throw null; } set { } }
|
||||
public string TypeName { get { throw null; } set { } }
|
||||
public override object Value { get { throw null; } set { } }
|
||||
public string XmlSchemaCollectionDatabase { get { throw null; } set { } }
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<IsPartialFacadeAssembly Condition="'$(TargetGroup)' == 'netfx'">true</IsPartialFacadeAssembly>
|
||||
<!-- Must match version supported by frameworks which support 4.3.* inbox.
|
||||
Can be removed when API is added and this assembly is versioned to 4.4.* -->
|
||||
<AssemblyVersion Condition="'$(TargetsNetFx)' != 'true'">4.3.0.0</AssemblyVersion>
|
||||
<AssemblyVersion Condition="'$(TargetsNetFx)' != 'true'">4.3.1.0</AssemblyVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'netfx-Debug|AnyCPU'" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'netfx-Release|AnyCPU'" />
|
||||
|
||||
@@ -183,8 +183,8 @@ namespace Microsoft.SqlServer.Server
|
||||
internal static ExtendedClrTypeCode DetermineExtendedTypeCodeForUseWithSqlDbType(
|
||||
SqlDbType dbType,
|
||||
bool isMultiValued,
|
||||
object value
|
||||
)
|
||||
object value,
|
||||
Type udtType)
|
||||
{
|
||||
ExtendedClrTypeCode extendedCode = ExtendedClrTypeCode.Invalid;
|
||||
|
||||
@@ -315,7 +315,16 @@ namespace Microsoft.SqlServer.Server
|
||||
}
|
||||
break;
|
||||
case SqlDbType.Udt:
|
||||
throw ADP.DbTypeNotSupported(SqlDbType.Udt.ToString());
|
||||
// Validate UDT type if caller gave us a type to validate against
|
||||
if (null == udtType || value.GetType() == udtType)
|
||||
{
|
||||
extendedCode = ExtendedClrTypeCode.Object;
|
||||
}
|
||||
else
|
||||
{
|
||||
extendedCode = ExtendedClrTypeCode.Invalid;
|
||||
}
|
||||
break;
|
||||
case SqlDbType.Time:
|
||||
if (value.GetType() == typeof(TimeSpan))
|
||||
extendedCode = ExtendedClrTypeCode.TimeSpan;
|
||||
@@ -430,8 +439,8 @@ namespace Microsoft.SqlServer.Server
|
||||
source.TypeSpecificNamePart1,
|
||||
source.TypeSpecificNamePart2,
|
||||
source.TypeSpecificNamePart3,
|
||||
true
|
||||
);
|
||||
true,
|
||||
source.Type);
|
||||
}
|
||||
|
||||
return new SqlMetaData(source.Name,
|
||||
@@ -460,7 +469,40 @@ namespace Microsoft.SqlServer.Server
|
||||
}
|
||||
else if (SqlDbType.Udt == source.SqlDbType)
|
||||
{
|
||||
throw ADP.DbTypeNotSupported(SqlDbType.Udt.ToString());
|
||||
// Split the input name. UdtTypeName is specified as single 3 part name.
|
||||
// NOTE: ParseUdtTypeName throws if format is incorrect
|
||||
string typeName = source.ServerTypeName;
|
||||
if (null != typeName)
|
||||
{
|
||||
string[] names = SqlParameter.ParseTypeName(typeName, true /* isUdtTypeName */);
|
||||
|
||||
if (1 == names.Length)
|
||||
{
|
||||
typeSpecificNamePart3 = names[0];
|
||||
}
|
||||
else if (2 == names.Length)
|
||||
{
|
||||
typeSpecificNamePart2 = names[0];
|
||||
typeSpecificNamePart3 = names[1];
|
||||
}
|
||||
else if (3 == names.Length)
|
||||
{
|
||||
typeSpecificNamePart1 = names[0];
|
||||
typeSpecificNamePart2 = names[1];
|
||||
typeSpecificNamePart3 = names[2];
|
||||
}
|
||||
else
|
||||
{
|
||||
throw ADP.ArgumentOutOfRange(nameof(typeName));
|
||||
}
|
||||
|
||||
if ((!string.IsNullOrEmpty(typeSpecificNamePart1) && TdsEnums.MAX_SERVERNAME < typeSpecificNamePart1.Length)
|
||||
|| (!string.IsNullOrEmpty(typeSpecificNamePart2) && TdsEnums.MAX_SERVERNAME < typeSpecificNamePart2.Length)
|
||||
|| (!string.IsNullOrEmpty(typeSpecificNamePart3) && TdsEnums.MAX_SERVERNAME < typeSpecificNamePart3.Length))
|
||||
{
|
||||
throw ADP.ArgumentOutOfRange(nameof(typeName));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return new SmiExtendedMetaData(source.SqlDbType,
|
||||
@@ -469,6 +511,7 @@ namespace Microsoft.SqlServer.Server
|
||||
source.Scale,
|
||||
source.LocaleId,
|
||||
source.CompareOptions,
|
||||
null,
|
||||
source.Name,
|
||||
typeSpecificNamePart1,
|
||||
typeSpecificNamePart2,
|
||||
@@ -603,6 +646,7 @@ namespace Microsoft.SqlServer.Server
|
||||
scale,
|
||||
columnLocale.LCID,
|
||||
SmiMetaData.DefaultNVarChar.CompareOptions,
|
||||
null,
|
||||
false, // no support for multi-valued columns in a TVP yet
|
||||
null, // no support for structured columns yet
|
||||
null, // no support for structured columns yet
|
||||
@@ -907,6 +951,7 @@ namespace Microsoft.SqlServer.Server
|
||||
scale,
|
||||
System.Globalization.CultureInfo.CurrentCulture.LCID,
|
||||
SmiMetaData.GetDefaultForType(colDbType).CompareOptions,
|
||||
null,
|
||||
false, // no support for multi-valued columns in a TVP yet
|
||||
null, // no support for structured columns yet
|
||||
null, // no support for structured columns yet
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -31,8 +31,8 @@ namespace Microsoft.SqlServer.Server
|
||||
SmiMetaData.DefaultNVarChar_NoCollation.Precision,
|
||||
SmiMetaData.DefaultNVarChar_NoCollation.Scale,
|
||||
SmiMetaData.DefaultNVarChar.LocaleId,
|
||||
SmiMetaData.DefaultNVarChar.CompareOptions
|
||||
);
|
||||
SmiMetaData.DefaultNVarChar.CompareOptions,
|
||||
null);
|
||||
|
||||
public virtual int FieldCount
|
||||
{
|
||||
@@ -55,8 +55,7 @@ namespace Microsoft.SqlServer.Server
|
||||
SqlMetaData metaData = GetSqlMetaData(ordinal);
|
||||
if (SqlDbType.Udt == metaData.SqlDbType)
|
||||
{
|
||||
Debug.Assert(false, "Udt is not supported");
|
||||
return null;
|
||||
return metaData.UdtTypeName;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -408,8 +407,7 @@ namespace Microsoft.SqlServer.Server
|
||||
{
|
||||
SqlMetaData metaData = GetSqlMetaData(i);
|
||||
typeCodes[i] = MetaDataUtilsSmi.DetermineExtendedTypeCodeForUseWithSqlDbType(
|
||||
metaData.SqlDbType, false /* isMultiValued */, values[i]
|
||||
);
|
||||
metaData.SqlDbType, false /* isMultiValued */, values[i], metaData.Type);
|
||||
if (ExtendedClrTypeCode.Invalid == typeCodes[i])
|
||||
{
|
||||
throw ADP.InvalidCast();
|
||||
@@ -431,8 +429,7 @@ namespace Microsoft.SqlServer.Server
|
||||
EnsureSubclassOverride();
|
||||
SqlMetaData metaData = GetSqlMetaData(ordinal);
|
||||
ExtendedClrTypeCode typeCode = MetaDataUtilsSmi.DetermineExtendedTypeCodeForUseWithSqlDbType(
|
||||
metaData.SqlDbType, false /* isMultiValued */, value
|
||||
);
|
||||
metaData.SqlDbType, false /* isMultiValued */, value, metaData.Type);
|
||||
if (ExtendedClrTypeCode.Invalid == typeCode)
|
||||
{
|
||||
throw ADP.InvalidCast();
|
||||
|
||||
@@ -446,7 +446,7 @@ namespace Microsoft.SqlServer.Server
|
||||
case StorageType.Int64: return _metadata ?? SmiMetaData.DefaultBigInt;
|
||||
case StorageType.Single: return SmiMetaData.DefaultReal;
|
||||
case StorageType.String: return _metadata ?? SmiMetaData.DefaultNVarChar;
|
||||
case StorageType.SqlDecimal: return new SmiMetaData(SqlDbType.Decimal, 17, ((SqlDecimal)_object).Precision, ((SqlDecimal)_object).Scale, 0, SqlCompareOptions.None);
|
||||
case StorageType.SqlDecimal: return new SmiMetaData(SqlDbType.Decimal, 17, ((SqlDecimal)_object).Precision, ((SqlDecimal)_object).Scale, 0, SqlCompareOptions.None, null);
|
||||
case StorageType.TimeSpan: return SmiMetaData.DefaultTime;
|
||||
}
|
||||
return null;
|
||||
|
||||
@@ -1 +1 @@
|
||||
02610b6a63ac39998eb7438555538320b2eb7cff
|
||||
f4c8b4f1d1901f995102985e2a069ea119843996
|
||||
@@ -167,7 +167,7 @@
|
||||
<value>Expecting argument of type {1}, but received type {0}.</value>
|
||||
</data>
|
||||
<data name="ADP_DeriveParametersNotSupported" xml:space="preserve">
|
||||
<value>{0} DeriveParameters only supports CommandType.StoredProcedure, not CommandType.{1}.</value>
|
||||
<value>{0} DeriveParameters only supports CommandType.StoredProcedure, not CommandType. {1}.</value>
|
||||
</data>
|
||||
<data name="ADP_NoStoredProcedureExists" xml:space="preserve">
|
||||
<value>The stored procedure '{0}' doesn't exist.</value>
|
||||
@@ -286,6 +286,9 @@
|
||||
<data name="ADP_UnknownDataType" xml:space="preserve">
|
||||
<value>No mapping exists from object type {0} to a known managed provider native type.</value>
|
||||
</data>
|
||||
<data name="ADP_UnknownDataTypeCode" xml:space="preserve">
|
||||
<value>Unable to handle an unknown TypeCode {0} returned by Type {1}.</value>
|
||||
</data>
|
||||
<data name="ADP_DbTypeNotSupported" xml:space="preserve">
|
||||
<value>No mapping exists from DbType {0} to a known {1}.</value>
|
||||
</data>
|
||||
@@ -343,6 +346,9 @@
|
||||
<data name="SQL_InvalidSQLServerVersionUnknown" xml:space="preserve">
|
||||
<value>Unsupported SQL Server version. The .Net Framework SqlClient Data Provider can only be used with SQL Server versions 7.0 and later.</value>
|
||||
</data>
|
||||
<data name="SQL_CannotCreateNormalizer" xml:space="preserve">
|
||||
<value>Cannot create normalizer for '{0}'.</value>
|
||||
</data>
|
||||
<data name="SQL_CannotModifyPropertyAsyncOperationInProgress" xml:space="preserve">
|
||||
<value>{0} cannot be changed while async operation is in progress.</value>
|
||||
</data>
|
||||
@@ -676,6 +682,12 @@
|
||||
<data name="SqlMisc_SubclassMustOverride" xml:space="preserve">
|
||||
<value>Subclass did not override a required method.</value>
|
||||
</data>
|
||||
<data name="SqlUdtReason_NoUdtAttribute" xml:space="preserve">
|
||||
<value>no UDT attribute</value>
|
||||
</data>
|
||||
<data name="SQLUDT_InvalidSqlType" xml:space="preserve">
|
||||
<value>Specified type is not registered on the target server. {0}.</value>
|
||||
</data>
|
||||
<data name="Sql_InternalError" xml:space="preserve">
|
||||
<value>Internal Error</value>
|
||||
</data>
|
||||
@@ -766,6 +778,27 @@
|
||||
<data name="SqlProvider_SortOrdinalGreaterThanFieldCount" xml:space="preserve">
|
||||
<value>The sort ordinal {0} on field {1} exceeds the total number of fields.</value>
|
||||
</data>
|
||||
<data name="SQLUDT_MaxByteSizeValue" xml:space="preserve">
|
||||
<value>range: 0-8000</value>
|
||||
</data>
|
||||
<data name="SQLUDT_Unexpected" xml:space="preserve">
|
||||
<value>unexpected error encountered in SqlClient data provider. {0}</value>
|
||||
</data>
|
||||
<data name="SQLUDT_UnexpectedUdtTypeName" xml:space="preserve">
|
||||
<value>UdtTypeName property must be set only for UDT parameters.</value>
|
||||
</data>
|
||||
<data name="SQLUDT_InvalidUdtTypeName" xml:space="preserve">
|
||||
<value>UdtTypeName property must be set for UDT parameters.</value>
|
||||
</data>
|
||||
<data name="SqlUdt_InvalidUdtMessage" xml:space="preserve">
|
||||
<value>'{0}' is an invalid user defined type, reason: {1}.</value>
|
||||
</data>
|
||||
<data name="SQL_UDTTypeName" xml:space="preserve">
|
||||
<value>SqlParameter.UdtTypeName is an invalid multipart name</value>
|
||||
</data>
|
||||
<data name="SQL_InvalidUdt3PartNameFormat" xml:space="preserve">
|
||||
<value>Invalid 3 part name format for UdtTypeName.</value>
|
||||
</data>
|
||||
<data name="IEnumerableOfSqlDataRecordHasNoRows" xml:space="preserve">
|
||||
<value>There are no records in the SqlDataRecord enumeration. To send a table-valued parameter with no rows, use a null reference for the value instead.</value>
|
||||
</data>
|
||||
|
||||
@@ -89,8 +89,16 @@
|
||||
<Compile Include="System\Data\ProviderBase\DbMetaDataFactory.cs" />
|
||||
<Compile Include="System\Data\ProviderBase\DbReferenceCollection.cs" />
|
||||
<Compile Include="System\Data\ProviderBase\TimeoutTimer.cs" />
|
||||
<Compile Include="System\Data\Sql\IBinarySerialize.cs" />
|
||||
<Compile Include="System\Data\Sql\InvalidUdtException.cs" />
|
||||
<Compile Include="System\Data\Sql\SqlFunctionAttribute.cs" />
|
||||
<Compile Include="System\Data\Sql\SqlMetaData.cs" />
|
||||
<Compile Include="System\Data\Sql\SqlMethodAttribute.cs" />
|
||||
<Compile Include="System\Data\Sql\SqlNorm.cs" />
|
||||
<Compile Include="System\Data\Sql\SqlNotificationRequest.cs" />
|
||||
<Compile Include="System\Data\Sql\SqlSer.cs" />
|
||||
<Compile Include="System\Data\Sql\SqlUserDefinedAggregateAttribute.cs" />
|
||||
<Compile Include="System\Data\Sql\SqlUserDefinedTypeAttribute.cs" />
|
||||
<Compile Include="System\Data\SqlClient\ApplicationIntent.cs" />
|
||||
<Compile Include="System\Data\SqlClient\LocalDBAPI.cs" />
|
||||
<Compile Include="System\Data\SqlClient\ParameterPeekAheadValue.cs" />
|
||||
@@ -133,7 +141,7 @@
|
||||
<Compile Include="System\Data\SqlClient\SqlInfoMessageEventHandler.cs" />
|
||||
<Compile Include="System\Data\SqlClient\SqlInternalConnection.cs" />
|
||||
<Compile Include="System\Data\SqlClient\SqlInternalConnectionTds.cs" />
|
||||
<Compile Include="System\Data\SqlClient\sqlinternaltransaction.cs" />
|
||||
<Compile Include="System\Data\SqlClient\SqlInternalTransaction.cs" />
|
||||
<Compile Include="System\Data\SqlClient\SqlMetadataFactory.cs" />
|
||||
<Compile Include="System\Data\SqlClient\SqlNotificationEventArgs.cs" />
|
||||
<Compile Include="System\Data\SqlClient\SqlNotificationInfo.cs" />
|
||||
@@ -154,6 +162,7 @@
|
||||
<Compile Include="System\Data\SqlClient\SqlStatistics.cs" />
|
||||
<Compile Include="System\Data\SqlClient\SqlStream.cs" />
|
||||
<Compile Include="System\Data\SqlClient\SqlTransaction.cs" />
|
||||
<Compile Include="System\Data\SqlClient\SqlUdtInfo.cs" />
|
||||
<Compile Include="System\Data\SqlClient\SqlUtil.cs" />
|
||||
<Compile Include="System\Data\SqlClient\TdsEnums.cs" />
|
||||
<Compile Include="System\Data\SqlClient\TdsParameterSetter.cs" />
|
||||
@@ -228,6 +237,10 @@
|
||||
</ItemGroup>
|
||||
<!-- Windows dependencies for Integrated Authentication for MANAGED_SNI build -->
|
||||
<ItemGroup Condition=" '$(TargetsWindows)' == 'true' And '$(IsPartialFacadeAssembly)' != 'true' ">
|
||||
<Reference Include="System.Memory" />
|
||||
<Compile Include="$(CommonPath)\Interop\Windows\SChannel\Interop.SecPkgContext_ApplicationProtocol.cs">
|
||||
<Link>Common\Interop\Windows\SChannel\Interop.SecPkgContext_ApplicationProtocol.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="$(CommonPath)\System\Net\Security\NegotiateStreamPal.Windows.cs">
|
||||
<Link>Common\System\Net\Security\NegotiateStreamPal.Windows.cs</Link>
|
||||
</Compile>
|
||||
|
||||
@@ -63,7 +63,12 @@ namespace System.Data.Common
|
||||
OverflowException e = new OverflowException(error, inner);
|
||||
return e;
|
||||
}
|
||||
|
||||
internal static TypeLoadException TypeLoad(string error)
|
||||
{
|
||||
TypeLoadException e = new TypeLoadException(error);
|
||||
TraceExceptionAsReturnValue(e);
|
||||
return e;
|
||||
}
|
||||
internal static PlatformNotSupportedException DbTypeNotSupported(string dbType)
|
||||
{
|
||||
PlatformNotSupportedException e = new PlatformNotSupportedException(SR.GetString(SR.SQL_DbTypeNotSupportedOnThisPlatform, dbType));
|
||||
@@ -461,10 +466,11 @@ namespace System.Data.Common
|
||||
return IO(SR.GetString(SR.SqlMisc_StreamErrorMessage), internalException);
|
||||
}
|
||||
|
||||
internal static ArgumentException InvalidDataType(string typeName)
|
||||
internal static ArgumentException InvalidDataType(TypeCode typecode)
|
||||
{
|
||||
return Argument(SR.GetString(SR.ADP_InvalidDataType, typeName));
|
||||
return Argument(SR.GetString(SR.ADP_InvalidDataType, typecode.ToString()));
|
||||
}
|
||||
|
||||
internal static ArgumentException UnknownDataType(Type dataType)
|
||||
{
|
||||
return Argument(SR.GetString(SR.ADP_UnknownDataType, dataType.FullName));
|
||||
@@ -474,6 +480,10 @@ namespace System.Data.Common
|
||||
{
|
||||
return Argument(SR.GetString(SR.ADP_DbTypeNotSupported, type.ToString(), enumtype.Name));
|
||||
}
|
||||
internal static ArgumentException UnknownDataTypeCode(Type dataType, TypeCode typeCode)
|
||||
{
|
||||
return Argument(SR.GetString(SR.ADP_UnknownDataTypeCode, ((int)typeCode).ToString(CultureInfo.InvariantCulture), dataType.FullName));
|
||||
}
|
||||
internal static ArgumentException InvalidOffsetValue(int value)
|
||||
{
|
||||
return Argument(SR.GetString(SR.ADP_InvalidOffsetValue, value.ToString(CultureInfo.InvariantCulture)));
|
||||
@@ -853,5 +863,22 @@ namespace System.Data.Common
|
||||
{
|
||||
return Provider(SR.GetString(SR.ADP_TransactionCompletedButNotDisposed));
|
||||
}
|
||||
|
||||
internal static ArgumentOutOfRangeException InvalidUserDefinedTypeSerializationFormat(Microsoft.SqlServer.Server.Format value)
|
||||
{
|
||||
return InvalidEnumerationValue(typeof(Microsoft.SqlServer.Server.Format), (int)value);
|
||||
}
|
||||
|
||||
internal static ArgumentOutOfRangeException NotSupportedUserDefinedTypeSerializationFormat(Microsoft.SqlServer.Server.Format value, string method)
|
||||
{
|
||||
return NotSupportedEnumerationValue(typeof(Microsoft.SqlServer.Server.Format), value.ToString(), method);
|
||||
}
|
||||
|
||||
internal static ArgumentOutOfRangeException ArgumentOutOfRange(string message, string parameterName, object value)
|
||||
{
|
||||
ArgumentOutOfRangeException e = new ArgumentOutOfRangeException(parameterName, value, message);
|
||||
TraceExceptionAsReturnValue(e);
|
||||
return e;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -6,6 +6,9 @@ using System.Runtime.Serialization;
|
||||
namespace System.Data
|
||||
{
|
||||
[Serializable]
|
||||
#if !MONO
|
||||
[System.Runtime.CompilerServices.TypeForwardedFrom("System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
|
||||
#endif
|
||||
public sealed class OperationAbortedException : SystemException
|
||||
{
|
||||
private OperationAbortedException(string message, Exception innerException) : base(message, innerException)
|
||||
@@ -13,6 +16,10 @@ namespace System.Data
|
||||
HResult = unchecked((int)0x80131936);
|
||||
}
|
||||
|
||||
private OperationAbortedException(SerializationInfo info, StreamingContext context) : base(info, context)
|
||||
{
|
||||
}
|
||||
|
||||
internal static OperationAbortedException Aborted(Exception inner)
|
||||
{
|
||||
OperationAbortedException e;
|
||||
|
||||
@@ -862,8 +862,6 @@ namespace System.Data.ProviderBase
|
||||
CleanupConnectionOnTransactionCompletion(transaction);
|
||||
}
|
||||
|
||||
// TODO: Review whether we need the unmanaged code permission when we have the new object model available.
|
||||
// [SecurityPermission(SecurityAction.Assert, Flags = SecurityPermissionFlag.UnmanagedCode)]
|
||||
private void TransactionOutcomeEnlist(Transaction transaction)
|
||||
{
|
||||
transaction.TransactionCompleted += new TransactionCompletedEventHandler(TransactionCompletedEvent);
|
||||
|
||||
18
external/corefx/src/System.Data.SqlClient/src/System/Data/Sql/IBinarySerialize.cs
vendored
Normal file
18
external/corefx/src/System.Data.SqlClient/src/System/Data/Sql/IBinarySerialize.cs
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
// 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.SqlServer.Server
|
||||
{
|
||||
// This interface is used by types that want full control over the
|
||||
// binary serialization format.
|
||||
public interface IBinarySerialize
|
||||
{
|
||||
// Read from the specified binary reader.
|
||||
void Read(BinaryReader r);
|
||||
// Write to the specified binary writer.
|
||||
void Write(BinaryWriter w);
|
||||
}
|
||||
}
|
||||
50
external/corefx/src/System.Data.SqlClient/src/System/Data/Sql/InvalidUdtException.cs
vendored
Normal file
50
external/corefx/src/System.Data.SqlClient/src/System/Data/Sql/InvalidUdtException.cs
vendored
Normal file
@@ -0,0 +1,50 @@
|
||||
// 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.Data.Common;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Security.Permissions;
|
||||
|
||||
namespace Microsoft.SqlServer.Server
|
||||
{
|
||||
[Serializable]
|
||||
public sealed class InvalidUdtException : SystemException
|
||||
{
|
||||
private const int InvalidUdtHResult = unchecked((int)0x80131937);
|
||||
|
||||
internal InvalidUdtException() : base()
|
||||
{
|
||||
HResult = InvalidUdtHResult;
|
||||
}
|
||||
|
||||
internal InvalidUdtException(string message) : base(message)
|
||||
{
|
||||
HResult = InvalidUdtHResult;
|
||||
}
|
||||
|
||||
internal InvalidUdtException(string message, Exception innerException) : base(message, innerException)
|
||||
{
|
||||
HResult = InvalidUdtHResult;
|
||||
}
|
||||
|
||||
private InvalidUdtException(SerializationInfo si, StreamingContext sc) : base(si, sc)
|
||||
{
|
||||
}
|
||||
|
||||
public override void GetObjectData(SerializationInfo si, StreamingContext context)
|
||||
{
|
||||
base.GetObjectData(si, context);
|
||||
}
|
||||
|
||||
internal static InvalidUdtException Create(Type udtType, string resourceReason)
|
||||
{
|
||||
string reason = SR.GetString(resourceReason);
|
||||
string message = SR.GetString(SR.SqlUdt_InvalidUdtMessage, udtType.FullName, reason);
|
||||
InvalidUdtException e = new InvalidUdtException(message);
|
||||
ADP.TraceExceptionAsReturnValue(e);
|
||||
return e;
|
||||
}
|
||||
}
|
||||
}
|
||||
89
external/corefx/src/System.Data.SqlClient/src/System/Data/Sql/SqlFunctionAttribute.cs
vendored
Normal file
89
external/corefx/src/System.Data.SqlClient/src/System/Data/Sql/SqlFunctionAttribute.cs
vendored
Normal file
@@ -0,0 +1,89 @@
|
||||
// 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.SqlServer.Server
|
||||
{
|
||||
[Serializable]
|
||||
public enum DataAccessKind
|
||||
{
|
||||
None = 0,
|
||||
Read = 1,
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public enum SystemDataAccessKind
|
||||
{
|
||||
None = 0,
|
||||
Read = 1,
|
||||
}
|
||||
|
||||
// sql specific attribute
|
||||
[AttributeUsage(AttributeTargets.Method, AllowMultiple = false, Inherited = false), Serializable]
|
||||
public class SqlFunctionAttribute : Attribute
|
||||
{
|
||||
private bool _isDeterministic;
|
||||
private DataAccessKind _dataAccess;
|
||||
private SystemDataAccessKind _systemDataAccess;
|
||||
private bool _isPrecise;
|
||||
private string _name;
|
||||
private string _tableDefinition;
|
||||
private string _fillRowMethodName;
|
||||
|
||||
public SqlFunctionAttribute()
|
||||
{
|
||||
// default values
|
||||
_isDeterministic = false;
|
||||
_dataAccess = DataAccessKind.None;
|
||||
_systemDataAccess = SystemDataAccessKind.None;
|
||||
_isPrecise = false;
|
||||
_name = null;
|
||||
_tableDefinition = null;
|
||||
_fillRowMethodName = null;
|
||||
}
|
||||
|
||||
public bool IsDeterministic
|
||||
{
|
||||
get => _isDeterministic;
|
||||
set => _isDeterministic = value;
|
||||
}
|
||||
|
||||
public DataAccessKind DataAccess
|
||||
{
|
||||
get => _dataAccess;
|
||||
set => _dataAccess = value;
|
||||
}
|
||||
|
||||
public SystemDataAccessKind SystemDataAccess
|
||||
{
|
||||
get => _systemDataAccess;
|
||||
set => _systemDataAccess = value;
|
||||
}
|
||||
|
||||
public bool IsPrecise
|
||||
{
|
||||
get => _isPrecise;
|
||||
set => _isPrecise = value;
|
||||
}
|
||||
|
||||
public string Name
|
||||
{
|
||||
get => _name;
|
||||
set => _name = value;
|
||||
}
|
||||
|
||||
public string TableDefinition
|
||||
{
|
||||
get => _tableDefinition;
|
||||
set => _tableDefinition = value;
|
||||
}
|
||||
|
||||
public string FillRowMethodName
|
||||
{
|
||||
get => _fillRowMethodName;
|
||||
set => _fillRowMethodName = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
42
external/corefx/src/System.Data.SqlClient/src/System/Data/Sql/SqlMethodAttribute.cs
vendored
Normal file
42
external/corefx/src/System.Data.SqlClient/src/System/Data/Sql/SqlMethodAttribute.cs
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
// 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.SqlServer.Server
|
||||
{
|
||||
[AttributeUsage(AttributeTargets.Method, AllowMultiple = false, Inherited = false), Serializable]
|
||||
public sealed class SqlMethodAttribute : SqlFunctionAttribute
|
||||
{
|
||||
private bool _isCalledOnNullInputs;
|
||||
private bool _isMutator;
|
||||
private bool _shouldInvokeIfReceiverIsNull;
|
||||
|
||||
public SqlMethodAttribute()
|
||||
{
|
||||
// default values
|
||||
_isCalledOnNullInputs = true;
|
||||
_isMutator = false;
|
||||
_shouldInvokeIfReceiverIsNull = false;
|
||||
}
|
||||
|
||||
public bool OnNullCall
|
||||
{
|
||||
get => _isCalledOnNullInputs;
|
||||
set => _isCalledOnNullInputs = value;
|
||||
}
|
||||
|
||||
public bool IsMutator
|
||||
{
|
||||
get => _isMutator;
|
||||
set => _isMutator = value;
|
||||
}
|
||||
|
||||
public bool InvokeIfReceiverIsNull
|
||||
{
|
||||
get => _shouldInvokeIfReceiverIsNull;
|
||||
set => _shouldInvokeIfReceiverIsNull = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user