diff --git a/src/Microsoft.Data.SqlClient/netcore/src/Microsoft.Data.SqlClient.csproj b/src/Microsoft.Data.SqlClient/netcore/src/Microsoft.Data.SqlClient.csproj index 4328cfeebc..b83ca8a3ec 100644 --- a/src/Microsoft.Data.SqlClient/netcore/src/Microsoft.Data.SqlClient.csproj +++ b/src/Microsoft.Data.SqlClient/netcore/src/Microsoft.Data.SqlClient.csproj @@ -60,6 +60,9 @@ Microsoft\Data\SqlClient\ActiveDirectoryAuthenticationTimeoutRetryHelper.cs + + Microsoft\Data\SqlClient\ApplicationIntent.cs + Microsoft\Data\SqlClient\ActiveDirectoryAuthenticationProvider.cs @@ -72,6 +75,24 @@ Microsoft\Data\SqlClient\OnChangedEventHandler.cs + + Microsoft\Data\SqlClient\ParameterPeekAheadValue.cs + + + Microsoft\Data\SqlClient\PoolBlockingPeriod.cs + + + Microsoft\Data\SqlClient\RowsCopiedEventArgs.cs + + + Microsoft\Data\SqlClient\RowsCopiedEventHandler.cs + + + Microsoft\Data\SqlClient\SortOrder.cs + + + Microsoft\Data\SqlClient\SqlAuthenticationToken.cs + Microsoft\Data\SqlClient\SqlAeadAes256CbcHmac256Algorithm.cs @@ -93,6 +114,9 @@ Microsoft\Data\SqlClient\SqlAuthenticationProvider.cs + + Microsoft\Data\SqlClient\SqlBulkCopyColumnMapping.cs + Microsoft\Data\SqlClient\SqlBulkCopyOptions.cs @@ -102,9 +126,15 @@ Microsoft\Data\SqlClient\SqlBulkCopyColumnOrderHintCollection.cs + + Microsoft\Data\SqlClient\SqlClientEncryptionAlgorithm.cs + Microsoft\Data\SqlClient\SqlClientEncryptionAlgorithmFactory.cs + + Microsoft\Data\SqlClient\SqlClientEncryptionAlgorithmFactoryList.cs + Microsoft\Data\SqlClient\SqlClientEncryptionType.cs @@ -166,7 +196,6 @@ - @@ -266,7 +295,6 @@ - @@ -275,15 +303,9 @@ - - - - - - @@ -366,10 +388,8 @@ - - diff --git a/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/ApplicationIntent.cs b/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/ApplicationIntent.cs deleted file mode 100644 index f8582d59e8..0000000000 --- a/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/ApplicationIntent.cs +++ /dev/null @@ -1,16 +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. - -namespace Microsoft.Data.SqlClient -{ - /// - public enum ApplicationIntent - { - /// - ReadWrite = 0, - - /// - ReadOnly = 1, - } -} diff --git a/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/PoolBlockingPeriod.cs b/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/PoolBlockingPeriod.cs deleted file mode 100644 index 4bfedeb1e9..0000000000 --- a/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/PoolBlockingPeriod.cs +++ /dev/null @@ -1,19 +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. - -namespace Microsoft.Data.SqlClient -{ - /// - public enum PoolBlockingPeriod - { - /// - Auto = 0, // Blocking period OFF for Azure SQL servers, but ON for all other SQL servers. - - /// - AlwaysBlock = 1, // Blocking period ON for all SQL servers including Azure SQL servers. - - /// - NeverBlock = 2, // Blocking period OFF for all SQL servers including Azure SQL servers. - } -} diff --git a/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SortOrder.cs b/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SortOrder.cs deleted file mode 100644 index 4ce62535ef..0000000000 --- a/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SortOrder.cs +++ /dev/null @@ -1,20 +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. - -namespace Microsoft.Data.SqlClient -{ - /// - public enum SortOrder - { - /// - Unspecified = -1, - - /// - Ascending = 0, - - /// - Descending = 1 - } -} - diff --git a/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlClientEncryptionAlgorithm.cs b/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlClientEncryptionAlgorithm.cs deleted file mode 100644 index 2f2b944cf7..0000000000 --- a/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlClientEncryptionAlgorithm.cs +++ /dev/null @@ -1,29 +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. - -namespace Microsoft.Data.SqlClient -{ - - /// - /// Abstract base class for all TCE encryption algorithms. It exposes two functions - /// 1. Encrypt - This function is used by SqlClient under the covers to transparently encrypt TCE enabled column data. - /// 2. Decrypt - This function is used by SqlClient under the covers to transparently decrypt TCE enabled column data. - /// - internal abstract class SqlClientEncryptionAlgorithm - { - /// - /// Encrypts the plainText with a column encryption key - /// - /// Plain text value to be encrypted - /// - internal abstract byte[] EncryptData(byte[] plainText); - - /// - /// Decrypts the cipherText with a column encryption key - /// - /// Ciphertext value to be decrypted - /// - internal abstract byte[] DecryptData(byte[] cipherText); - } -} diff --git a/src/Microsoft.Data.SqlClient/netfx/src/Microsoft.Data.SqlClient.csproj b/src/Microsoft.Data.SqlClient/netfx/src/Microsoft.Data.SqlClient.csproj index f90f36784d..a1c099b526 100644 --- a/src/Microsoft.Data.SqlClient/netfx/src/Microsoft.Data.SqlClient.csproj +++ b/src/Microsoft.Data.SqlClient/netfx/src/Microsoft.Data.SqlClient.csproj @@ -71,6 +71,9 @@ Pdbonly True + + $(DefineConstants);NETFRAMEWORK; + @@ -114,6 +117,9 @@ Microsoft\Data\SqlClient\ActiveDirectoryAuthenticationTimeoutRetryHelper.cs + + Microsoft\Data\SqlClient\ApplicationIntent.cs + Microsoft\Data\SqlClient\ActiveDirectoryAuthenticationProvider.cs @@ -126,6 +132,24 @@ Microsoft\Data\SqlClient\OnChangedEventHandler.cs + + Microsoft\Data\SqlClient\ParameterPeekAheadValue.cs + + + Microsoft\Data\SqlClient\PoolBlockingPeriod.cs + + + Microsoft\Data\SqlClient\RowsCopiedEventArgs.cs + + + Microsoft\Data\SqlClient\RowsCopiedEventHandler.cs + + + Microsoft\Data\SqlClient\SortOrder.cs + + + Microsoft\Data\SqlClient\SqlAuthenticationToken.cs + Microsoft\Data\SqlClient\SqlAeadAes256CbcHmac256Algorithm.cs @@ -147,6 +171,9 @@ Microsoft\Data\SqlClient\SqlAuthenticationProvider.cs + + Microsoft\Data\SqlClient\SqlBulkCopyColumnMapping.cs + Microsoft\Data\SqlClient\SqlBulkCopyOptions.cs @@ -156,9 +183,15 @@ Microsoft\Data\SqlClient\SqlBulkCopyColumnOrderHintCollection.cs + + Microsoft\Data\SqlClient\SqlClientEncryptionAlgorithm.cs + Microsoft\Data\SqlClient\SqlClientEncryptionAlgorithmFactory.cs + + Microsoft\Data\SqlClient\SqlClientEncryptionAlgorithmFactoryList.cs + Microsoft\Data\SqlClient\SqlClientEncryptionType.cs @@ -212,7 +245,6 @@ - @@ -221,8 +253,6 @@ - - @@ -232,26 +262,19 @@ - - - - - - - diff --git a/src/Microsoft.Data.SqlClient/netfx/src/Microsoft/Data/SqlClient/ApplicationIntent.cs b/src/Microsoft.Data.SqlClient/netfx/src/Microsoft/Data/SqlClient/ApplicationIntent.cs deleted file mode 100644 index 792d738f55..0000000000 --- a/src/Microsoft.Data.SqlClient/netfx/src/Microsoft/Data/SqlClient/ApplicationIntent.cs +++ /dev/null @@ -1,21 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; - -namespace Microsoft.Data.SqlClient -{ - - - /// - [Serializable] - public enum ApplicationIntent - { - /// - ReadWrite = 0, - - /// - ReadOnly = 1, - } -} diff --git a/src/Microsoft.Data.SqlClient/netfx/src/Microsoft/Data/SqlClient/ParameterPeekAheadValue.cs b/src/Microsoft.Data.SqlClient/netfx/src/Microsoft/Data/SqlClient/ParameterPeekAheadValue.cs deleted file mode 100644 index 5da62e1106..0000000000 --- a/src/Microsoft.Data.SqlClient/netfx/src/Microsoft/Data/SqlClient/ParameterPeekAheadValue.cs +++ /dev/null @@ -1,29 +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.Collections.Generic; -using Microsoft.Data.SqlClient.Server; - -namespace Microsoft.Data.SqlClient -{ - - // simple storage to contain objects that must be generated prior to sending data, but - // that we cannot re-generate at the time of sending the data. The entire purpose is - // to avoid long, complicated parameter lists that take every possible set of values. - // Instead, a single peekahead object is passed in, encapsulating whatever sets are needed. - // - // Example: - // When processing IEnumerable, we need to obtain the enumerator and - // the first record during metadata generation (metadata is stored in the first record), - // but to properly stream the value, we can't ask the IEnumerable for these objects again - // when it's time to send the actual values. - - internal class ParameterPeekAheadValue - { - // Peekahead for IEnumerable - internal IEnumerator Enumerator; - internal SqlDataRecord FirstRecord; - } - -} diff --git a/src/Microsoft.Data.SqlClient/netfx/src/Microsoft/Data/SqlClient/PoolBlockingPeriod.cs b/src/Microsoft.Data.SqlClient/netfx/src/Microsoft/Data/SqlClient/PoolBlockingPeriod.cs deleted file mode 100644 index 35a2c5fb00..0000000000 --- a/src/Microsoft.Data.SqlClient/netfx/src/Microsoft/Data/SqlClient/PoolBlockingPeriod.cs +++ /dev/null @@ -1,23 +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 -{ - - /// - [Serializable] - public enum PoolBlockingPeriod - { - /// - Auto = 0, - - /// - AlwaysBlock = 1, - - /// - NeverBlock = 2, - } -} diff --git a/src/Microsoft.Data.SqlClient/netfx/src/Microsoft/Data/SqlClient/RowsCopiedEventArgs.cs b/src/Microsoft.Data.SqlClient/netfx/src/Microsoft/Data/SqlClient/RowsCopiedEventArgs.cs deleted file mode 100644 index 434ba18d3a..0000000000 --- a/src/Microsoft.Data.SqlClient/netfx/src/Microsoft/Data/SqlClient/RowsCopiedEventArgs.cs +++ /dev/null @@ -1,42 +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. - -namespace Microsoft.Data.SqlClient -{ - /// - public class SqlRowsCopiedEventArgs : System.EventArgs - { - private bool _abort; - private long _rowsCopied; - - /// - public SqlRowsCopiedEventArgs(long rowsCopied) - { - _rowsCopied = rowsCopied; - } - - /// - public bool Abort - { - get - { - return _abort; - } - set - { - _abort = value; - } - - } - - /// - public long RowsCopied - { - get - { - return _rowsCopied; - } - } - } -} diff --git a/src/Microsoft.Data.SqlClient/netfx/src/Microsoft/Data/SqlClient/RowsCopiedEventHandler.cs b/src/Microsoft.Data.SqlClient/netfx/src/Microsoft/Data/SqlClient/RowsCopiedEventHandler.cs deleted file mode 100644 index bf52260361..0000000000 --- a/src/Microsoft.Data.SqlClient/netfx/src/Microsoft/Data/SqlClient/RowsCopiedEventHandler.cs +++ /dev/null @@ -1,9 +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. - -namespace Microsoft.Data.SqlClient -{ - /// - public delegate void SqlRowsCopiedEventHandler(object sender, SqlRowsCopiedEventArgs e); -} diff --git a/src/Microsoft.Data.SqlClient/netfx/src/Microsoft/Data/SqlClient/SortOrder.cs b/src/Microsoft.Data.SqlClient/netfx/src/Microsoft/Data/SqlClient/SortOrder.cs deleted file mode 100644 index d07d406464..0000000000 --- a/src/Microsoft.Data.SqlClient/netfx/src/Microsoft/Data/SqlClient/SortOrder.cs +++ /dev/null @@ -1,19 +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. - -namespace Microsoft.Data.SqlClient -{ - /// - public enum SortOrder - { - /// - Unspecified = -1, - - /// - Ascending = 0, - - /// - Descending = 1 - } -} diff --git a/src/Microsoft.Data.SqlClient/netfx/src/Microsoft/Data/SqlClient/SqlAuthenticationToken.cs b/src/Microsoft.Data.SqlClient/netfx/src/Microsoft/Data/SqlClient/SqlAuthenticationToken.cs deleted file mode 100644 index 140e7c3b93..0000000000 --- a/src/Microsoft.Data.SqlClient/netfx/src/Microsoft/Data/SqlClient/SqlAuthenticationToken.cs +++ /dev/null @@ -1,66 +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.Text; - -namespace Microsoft.Data.SqlClient -{ - - /// - public class SqlAuthenticationToken - { - /// - public DateTimeOffset ExpiresOn { get; } - - /// - public string AccessToken { get; } - - /// - public SqlAuthenticationToken(string accessToken, DateTimeOffset expiresOn) - { - if (string.IsNullOrEmpty(accessToken)) - throw SQL.ParameterCannotBeEmpty("AccessToken"); - - AccessToken = accessToken; - ExpiresOn = expiresOn; - } - - /// - /// Constructor. - /// - internal SqlAuthenticationToken(byte[] accessToken, DateTimeOffset expiresOn) - : this(AccessTokenStringFromBytes(accessToken), expiresOn) { } - - /// - /// Convert to driver's internal token class. - /// - internal SqlFedAuthToken ToSqlFedAuthToken() - { - var tokenBytes = AccessTokenBytesFromString(AccessToken); - return new SqlFedAuthToken - { - accessToken = tokenBytes, - dataLen = (uint)tokenBytes.Length, - expirationFileTime = ExpiresOn.ToFileTime() - }; - } - - /// - /// Convert token bytes to string. - /// - internal static string AccessTokenStringFromBytes(byte[] bytes) - { - return Encoding.Unicode.GetString(bytes); - } - - /// - /// Convert token string to bytes. - /// - internal static byte[] AccessTokenBytesFromString(string token) - { - return Encoding.Unicode.GetBytes(token); - } - } -} diff --git a/src/Microsoft.Data.SqlClient/netfx/src/Microsoft/Data/SqlClient/SqlClientEncryptionAlgorithmFactoryList.cs b/src/Microsoft.Data.SqlClient/netfx/src/Microsoft/Data/SqlClient/SqlClientEncryptionAlgorithmFactoryList.cs deleted file mode 100644 index 17da75c381..0000000000 --- a/src/Microsoft.Data.SqlClient/netfx/src/Microsoft/Data/SqlClient/SqlClientEncryptionAlgorithmFactoryList.cs +++ /dev/null @@ -1,85 +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.Collections.Concurrent; -using System.Diagnostics; -using System.Text; - -namespace Microsoft.Data.SqlClient -{ - /// - /// Implements a global directory of all the encryption algorithms registered with client. - /// - sealed internal class SqlClientEncryptionAlgorithmFactoryList - { - private readonly ConcurrentDictionary _encryptionAlgoFactoryList; - private static readonly SqlClientEncryptionAlgorithmFactoryList _singletonInstance = new SqlClientEncryptionAlgorithmFactoryList(); - - private SqlClientEncryptionAlgorithmFactoryList() - { - _encryptionAlgoFactoryList = new ConcurrentDictionary(concurrencyLevel: 4 * Environment.ProcessorCount /* default value in ConcurrentDictionary*/, capacity: 2); - - // Add wellknown algorithms - _encryptionAlgoFactoryList.TryAdd(SqlAeadAes256CbcHmac256Algorithm.AlgorithmName, new SqlAeadAes256CbcHmac256Factory()); - _encryptionAlgoFactoryList.TryAdd(SqlAes256CbcAlgorithm.AlgorithmName, new SqlAes256CbcFactory()); - } - - internal static SqlClientEncryptionAlgorithmFactoryList GetInstance() - { - return _singletonInstance; - } - - /// - /// - /// - /// - internal string GetRegisteredCipherAlgorithmNames() - { - StringBuilder builder = new StringBuilder(); - bool firstElem = true; - foreach (string key in _encryptionAlgoFactoryList.Keys) - { - if (firstElem) - { - builder.Append("'"); - firstElem = false; - } - else - { - builder.Append(", '"); - } - builder.Append(key); - builder.Append("'"); - } - - return builder.ToString(); - } - - /// - /// Gets the algorithm handle instance for a given algorithm and instantiates it using the provided key and the encryption type. - /// - /// - /// - /// - /// - internal void GetAlgorithm(SqlClientSymmetricKey key, byte type, string algorithmName, out SqlClientEncryptionAlgorithm encryptionAlgorithm) - { - encryptionAlgorithm = null; - - SqlClientEncryptionAlgorithmFactory factory = null; - if (!_encryptionAlgoFactoryList.TryGetValue(algorithmName, out factory)) - { - throw SQL.UnknownColumnEncryptionAlgorithm(algorithmName, - SqlClientEncryptionAlgorithmFactoryList.GetInstance().GetRegisteredCipherAlgorithmNames()); - } - - Debug.Assert(null != factory, "Null Algorithm Factory class detected"); - - // If the factory exists, following method will Create an algorithm object. If this fails, - // it will raise an exception. - encryptionAlgorithm = factory.Create(key, (SqlClientEncryptionType)type, algorithmName); - } - } -} diff --git a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/ApplicationIntent.cs b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/ApplicationIntent.cs new file mode 100644 index 0000000000..4e8bf1afa5 --- /dev/null +++ b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/ApplicationIntent.cs @@ -0,0 +1,19 @@ +// 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. + +namespace Microsoft.Data.SqlClient +{ + /// +#if NETFRAMEWORK + [System.Serializable] +#endif + public enum ApplicationIntent + { + /// + ReadWrite = 0, + + /// + ReadOnly = 1, + } +} diff --git a/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/ParameterPeekAheadValue.cs b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/ParameterPeekAheadValue.cs similarity index 100% rename from src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/ParameterPeekAheadValue.cs rename to src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/ParameterPeekAheadValue.cs diff --git a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/PoolBlockingPeriod.cs b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/PoolBlockingPeriod.cs new file mode 100644 index 0000000000..fbdeb20e33 --- /dev/null +++ b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/PoolBlockingPeriod.cs @@ -0,0 +1,22 @@ +// 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. + +namespace Microsoft.Data.SqlClient +{ + /// +#if NETFRAMEWORK + [System.Serializable] +#endif + public enum PoolBlockingPeriod + { + /// + Auto = 0, // Blocking period OFF for Azure SQL servers, but ON for all other SQL servers. + + /// + AlwaysBlock = 1, // Blocking period ON for all SQL servers including Azure SQL servers. + + /// + NeverBlock = 2, // Blocking period OFF for all SQL servers including Azure SQL servers. + } +} diff --git a/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/RowsCopiedEventArgs.cs b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/RowsCopiedEventArgs.cs similarity index 53% rename from src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/RowsCopiedEventArgs.cs rename to src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/RowsCopiedEventArgs.cs index b58b6460ec..8527b49115 100644 --- a/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/RowsCopiedEventArgs.cs +++ b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/RowsCopiedEventArgs.cs @@ -4,19 +4,19 @@ namespace Microsoft.Data.SqlClient { - /// + /// public class SqlRowsCopiedEventArgs : System.EventArgs { private bool _abort; private long _rowsCopied; - /// + /// public SqlRowsCopiedEventArgs(long rowsCopied) { _rowsCopied = rowsCopied; } - /// + /// public bool Abort { get @@ -29,7 +29,7 @@ public bool Abort } } - /// + /// public long RowsCopied { get diff --git a/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/RowsCopiedEventHandler.cs b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/RowsCopiedEventHandler.cs similarity index 62% rename from src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/RowsCopiedEventHandler.cs rename to src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/RowsCopiedEventHandler.cs index d32023d762..9a2571d9d8 100644 --- a/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/RowsCopiedEventHandler.cs +++ b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/RowsCopiedEventHandler.cs @@ -4,7 +4,7 @@ namespace Microsoft.Data.SqlClient { - /// + /// public delegate void SqlRowsCopiedEventHandler(object sender, SqlRowsCopiedEventArgs e); } diff --git a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SortOrder.cs b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SortOrder.cs new file mode 100644 index 0000000000..4e79b63799 --- /dev/null +++ b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SortOrder.cs @@ -0,0 +1,20 @@ +// 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. + +namespace Microsoft.Data.SqlClient +{ + /// + public enum SortOrder + { + /// + Unspecified = -1, + + /// + Ascending = 0, + + /// + Descending = 1 + } +} + diff --git a/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlAuthenticationToken.cs b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlAuthenticationToken.cs similarity index 72% rename from src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlAuthenticationToken.cs rename to src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlAuthenticationToken.cs index bbe46a3f45..018440c743 100644 --- a/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlAuthenticationToken.cs +++ b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlAuthenticationToken.cs @@ -7,16 +7,16 @@ namespace Microsoft.Data.SqlClient { - /// + /// public class SqlAuthenticationToken { - /// + /// public DateTimeOffset ExpiresOn { get; } - /// + /// public string AccessToken { get; } - /// + /// public SqlAuthenticationToken(string accessToken, DateTimeOffset expiresOn) { if (string.IsNullOrEmpty(accessToken)) diff --git a/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlBulkCopyColumnMapping.cs b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlBulkCopyColumnMapping.cs similarity index 61% rename from src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlBulkCopyColumnMapping.cs rename to src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlBulkCopyColumnMapping.cs index 69a99f6e5e..2f6ef5c532 100644 --- a/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlBulkCopyColumnMapping.cs +++ b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlBulkCopyColumnMapping.cs @@ -6,9 +6,7 @@ namespace Microsoft.Data.SqlClient { - // ------------------------------------------------------------------------------------------------- - // this class helps allows the user to create association between source and target columns - /// + /// public sealed class SqlBulkCopyColumnMapping { internal string _destinationColumnName; @@ -21,7 +19,7 @@ public sealed class SqlBulkCopyColumnMapping internal int _internalDestinationColumnOrdinal; internal int _internalSourceColumnOrdinal; // -1 indicates an undetermined value - /// + /// public string DestinationColumn { get @@ -39,7 +37,7 @@ public string DestinationColumn } } - /// + /// public int DestinationOrdinal { get @@ -60,7 +58,7 @@ public int DestinationOrdinal } } - /// + /// public string SourceColumn { get @@ -78,7 +76,7 @@ public string SourceColumn } } - /// + /// public int SourceOrdinal { get @@ -99,34 +97,34 @@ public int SourceOrdinal } } - /// + /// public SqlBulkCopyColumnMapping() { _internalSourceColumnOrdinal = -1; } - /// + /// public SqlBulkCopyColumnMapping(string sourceColumn, string destinationColumn) { SourceColumn = sourceColumn; DestinationColumn = destinationColumn; } - /// + /// public SqlBulkCopyColumnMapping(int sourceColumnOrdinal, string destinationColumn) { SourceOrdinal = sourceColumnOrdinal; DestinationColumn = destinationColumn; } - /// + /// public SqlBulkCopyColumnMapping(string sourceColumn, int destinationOrdinal) { SourceColumn = sourceColumn; DestinationOrdinal = destinationOrdinal; } - /// + /// public SqlBulkCopyColumnMapping(int sourceColumnOrdinal, int destinationOrdinal) { SourceOrdinal = sourceColumnOrdinal; diff --git a/src/Microsoft.Data.SqlClient/netfx/src/Microsoft/Data/SqlClient/SqlClientEncryptionAlgorithm.cs b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlClientEncryptionAlgorithm.cs similarity index 100% rename from src/Microsoft.Data.SqlClient/netfx/src/Microsoft/Data/SqlClient/SqlClientEncryptionAlgorithm.cs rename to src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlClientEncryptionAlgorithm.cs diff --git a/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlClientEncryptionAlgorithmFactoryList.cs b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlClientEncryptionAlgorithmFactoryList.cs similarity index 100% rename from src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlClientEncryptionAlgorithmFactoryList.cs rename to src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlClientEncryptionAlgorithmFactoryList.cs