diff --git a/Samples/Dapper/App.config b/Samples/Dapper/App.config
deleted file mode 100644
index 731e8f2..0000000
--- a/Samples/Dapper/App.config
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Samples/Dapper/ElasticDapper.csproj b/Samples/Dapper/ElasticDapper.csproj
index 72a34ab..43294c1 100644
--- a/Samples/Dapper/ElasticDapper.csproj
+++ b/Samples/Dapper/ElasticDapper.csproj
@@ -1,21 +1,18 @@
- netcoreapp3.1
+ net5.0
Exe
-
-
-
-
-
+
+
+
+
-
-
-
+
\ No newline at end of file
diff --git a/Samples/Dapper/Program.cs b/Samples/Dapper/Program.cs
index 7ababa7..dafc787 100644
--- a/Samples/Dapper/Program.cs
+++ b/Samples/Dapper/Program.cs
@@ -2,12 +2,11 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System;
+using System.Collections.Generic;
using System.Data.SqlClient;
-using System.Linq;
-using Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement;
using Dapper;
using DapperExtensions;
-using System.Collections.Generic;
+using Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement;
////////////////////////////////////////////////////////////////////////////////////////
// This sample illustrates the adjustments that need to be made to use Dapper
diff --git a/Samples/Dapper/Properties/AssemblyInfo.cs b/Samples/Dapper/Properties/AssemblyInfo.cs
index 18c948c..1307d31 100644
--- a/Samples/Dapper/Properties/AssemblyInfo.cs
+++ b/Samples/Dapper/Properties/AssemblyInfo.cs
@@ -1,8 +1,6 @@
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-using System.Reflection;
-using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// Setting ComVisible to false makes the types in this assembly not visible
diff --git a/Samples/Dapper/Sharding.cs b/Samples/Dapper/Sharding.cs
index 23915c6..a7625cf 100644
--- a/Samples/Dapper/Sharding.cs
+++ b/Samples/Dapper/Sharding.cs
@@ -2,7 +2,6 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System.Data.SqlClient;
-using System.Linq;
using Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement;
namespace ElasticDapper
diff --git a/Samples/EFCodeFirst/App.config b/Samples/EFCodeFirst/App.config
deleted file mode 100644
index 20c9bf2..0000000
--- a/Samples/EFCodeFirst/App.config
+++ /dev/null
@@ -1,20 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Samples/EFCodeFirst/App.config.LocalDb b/Samples/EFCodeFirst/App.config.LocalDb
deleted file mode 100644
index b3a86e2..0000000
--- a/Samples/EFCodeFirst/App.config.LocalDb
+++ /dev/null
@@ -1,20 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Samples/EFCodeFirst/ElasticScaleDbConfiguration.cs b/Samples/EFCodeFirst/ElasticScaleDbConfiguration.cs
index d42d1cd..3c6b3b8 100644
--- a/Samples/EFCodeFirst/ElasticScaleDbConfiguration.cs
+++ b/Samples/EFCodeFirst/ElasticScaleDbConfiguration.cs
@@ -2,10 +2,8 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System.Configuration;
-using System.Data.Common;
using System.Data.Entity;
using System.Data.Entity.Infrastructure;
-using System.Data.SqlClient;
namespace EFCodeFirstElasticScale
{
diff --git a/Samples/EFCodeFirst/EntityFrameworkCodeFirst.csproj b/Samples/EFCodeFirst/EntityFrameworkCodeFirst.csproj
index 737260e..327bf34 100644
--- a/Samples/EFCodeFirst/EntityFrameworkCodeFirst.csproj
+++ b/Samples/EFCodeFirst/EntityFrameworkCodeFirst.csproj
@@ -1,20 +1,20 @@
- netcoreapp3.1
+ net5.0
Exe
-
-
-
+
+
-
-
-
+
-
+
+
+
+
\ No newline at end of file
diff --git a/Samples/EFCodeFirst/Properties/AssemblyInfo.cs b/Samples/EFCodeFirst/Properties/AssemblyInfo.cs
index 65a7964..7576b46 100644
--- a/Samples/EFCodeFirst/Properties/AssemblyInfo.cs
+++ b/Samples/EFCodeFirst/Properties/AssemblyInfo.cs
@@ -1,8 +1,6 @@
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-using System.Reflection;
-using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// Setting ComVisible to false makes the types in this assembly not visible
diff --git a/Samples/EFCodeFirst/appsettings.json b/Samples/EFCodeFirst/appsettings.json
new file mode 100644
index 0000000..412a673
--- /dev/null
+++ b/Samples/EFCodeFirst/appsettings.json
@@ -0,0 +1,5 @@
+{
+ "ConnectionStrings": {
+ "DevelopmentDatabase": "Data Source=(localdb)\\v11.0;Initial Catalog=elasticscaledev;Integrated Security=True"
+ }
+}
\ No newline at end of file
diff --git a/Samples/EFMultiTenant/App.config b/Samples/EFMultiTenant/App.config
deleted file mode 100644
index 674586a..0000000
--- a/Samples/EFMultiTenant/App.config
+++ /dev/null
@@ -1,20 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Samples/EFMultiTenant/ElasticScaleDbConfiguration.cs b/Samples/EFMultiTenant/ElasticScaleDbConfiguration.cs
index 985f5ab..6945bac 100644
--- a/Samples/EFMultiTenant/ElasticScaleDbConfiguration.cs
+++ b/Samples/EFMultiTenant/ElasticScaleDbConfiguration.cs
@@ -2,10 +2,8 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System.Configuration;
-using System.Data.Common;
using System.Data.Entity;
using System.Data.Entity.Infrastructure;
-using System.Data.SqlClient;
namespace EFMultiTenantElasticScale
{
diff --git a/Samples/EFMultiTenant/EntityFrameworkMultiTenant.csproj b/Samples/EFMultiTenant/EntityFrameworkMultiTenant.csproj
index 90db092..0b9f011 100644
--- a/Samples/EFMultiTenant/EntityFrameworkMultiTenant.csproj
+++ b/Samples/EFMultiTenant/EntityFrameworkMultiTenant.csproj
@@ -1,26 +1,23 @@
- netcoreapp3.1
+ net5.0
Exe
-
-
-
+
+
+
+
+
+
+
-
+
-
-
-
-
-
-
-
diff --git a/Samples/EFMultiTenant/Program.cs b/Samples/EFMultiTenant/Program.cs
index 47800a5..143f546 100644
--- a/Samples/EFMultiTenant/Program.cs
+++ b/Samples/EFMultiTenant/Program.cs
@@ -5,7 +5,6 @@
using System.Data.Entity.Infrastructure;
using System.Data.SqlClient;
using System.Linq;
-using Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement;
////////////////////////////////////////////////////////////////////////////////////////
// This sample follows the CodeFirstNewDatabase Blogging tutorial for EF.
diff --git a/Samples/EFMultiTenant/Properties/AssemblyInfo.cs b/Samples/EFMultiTenant/Properties/AssemblyInfo.cs
index 18c948c..1307d31 100644
--- a/Samples/EFMultiTenant/Properties/AssemblyInfo.cs
+++ b/Samples/EFMultiTenant/Properties/AssemblyInfo.cs
@@ -1,8 +1,6 @@
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-using System.Reflection;
-using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// Setting ComVisible to false makes the types in this assembly not visible
diff --git a/Samples/EFMultiTenant/appsettings.json b/Samples/EFMultiTenant/appsettings.json
new file mode 100644
index 0000000..412a673
--- /dev/null
+++ b/Samples/EFMultiTenant/appsettings.json
@@ -0,0 +1,5 @@
+{
+ "ConnectionStrings": {
+ "DevelopmentDatabase": "Data Source=(localdb)\\v11.0;Initial Catalog=elasticscaledev;Integrated Security=True"
+ }
+}
\ No newline at end of file
diff --git a/Samples/ElasticScaleStarterKit/App.config b/Samples/ElasticScaleStarterKit/App.config
deleted file mode 100644
index 4efb849..0000000
--- a/Samples/ElasticScaleStarterKit/App.config
+++ /dev/null
@@ -1,37 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Samples/ElasticScaleStarterKit/CreateShardSample.cs b/Samples/ElasticScaleStarterKit/CreateShardSample.cs
index 239f1df..48daa76 100644
--- a/Samples/ElasticScaleStarterKit/CreateShardSample.cs
+++ b/Samples/ElasticScaleStarterKit/CreateShardSample.cs
@@ -1,7 +1,6 @@
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement;
diff --git a/Samples/ElasticScaleStarterKit/ElasticScaleStarterKit.csproj b/Samples/ElasticScaleStarterKit/ElasticScaleStarterKit.csproj
index 05ae169..d5b4faa 100644
--- a/Samples/ElasticScaleStarterKit/ElasticScaleStarterKit.csproj
+++ b/Samples/ElasticScaleStarterKit/ElasticScaleStarterKit.csproj
@@ -1,24 +1,23 @@
- netcoreapp3.1
+ net5.0
Exe
-
-
-
+
-
-
PreserveNewest
-
+
+
+
+
\ No newline at end of file
diff --git a/Samples/ElasticScaleStarterKit/ShardManagementUtils.cs b/Samples/ElasticScaleStarterKit/ShardManagementUtils.cs
index c25a69a..6c42f71 100644
--- a/Samples/ElasticScaleStarterKit/ShardManagementUtils.cs
+++ b/Samples/ElasticScaleStarterKit/ShardManagementUtils.cs
@@ -1,7 +1,6 @@
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-using System;
using Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement;
namespace ElasticScaleStarterKit
diff --git a/Samples/ElasticScaleStarterKit/appsettings.json b/Samples/ElasticScaleStarterKit/appsettings.json
new file mode 100644
index 0000000..3bb3c89
--- /dev/null
+++ b/Samples/ElasticScaleStarterKit/appsettings.json
@@ -0,0 +1,7 @@
+{
+ "ServerName": "(localdb)\\v11.0",
+ "IntegratedSecurity": true,
+ "UserName": "MyUserName",
+ "Password": "MyPassword",
+ "DatabaseEdition": "Basic"
+}
\ No newline at end of file
diff --git a/Samples/ShardSqlCmd/ShardSqlCmd.csproj b/Samples/ShardSqlCmd/ShardSqlCmd.csproj
index 0609d4b..5b5fd7c 100644
--- a/Samples/ShardSqlCmd/ShardSqlCmd.csproj
+++ b/Samples/ShardSqlCmd/ShardSqlCmd.csproj
@@ -1,18 +1,14 @@
- netcoreapp3.1
+ net5.0
Exe
-
-
-
+
-
-
diff --git a/Samples/ShardSqlCmd/packages.config b/Samples/ShardSqlCmd/packages.config
deleted file mode 100644
index 55e44e9..0000000
--- a/Samples/ShardSqlCmd/packages.config
+++ /dev/null
@@ -1,4 +0,0 @@
-
-
-
-
diff --git a/Src/ElasticScale.Client/ElasticScale.Common/ExceptionHandling/ExceptionExtensionMethods.cs b/Src/ElasticScale.Client/ElasticScale.Common/ExceptionHandling/ExceptionExtensionMethods.cs
index 58e562a..fd5986f 100644
--- a/Src/ElasticScale.Client/ElasticScale.Common/ExceptionHandling/ExceptionExtensionMethods.cs
+++ b/Src/ElasticScale.Client/ElasticScale.Common/ExceptionHandling/ExceptionExtensionMethods.cs
@@ -3,7 +3,6 @@
using System;
using System.Linq;
-using System.Reflection;
namespace Microsoft.Azure.SqlDatabase.ElasticScale
{
diff --git a/Src/ElasticScale.Client/ElasticScale.Common/InternalHelpers/ApplicationNameHelper.cs b/Src/ElasticScale.Client/ElasticScale.Common/InternalHelpers/ApplicationNameHelper.cs
index a1e124f..d474093 100644
--- a/Src/ElasticScale.Client/ElasticScale.Common/InternalHelpers/ApplicationNameHelper.cs
+++ b/Src/ElasticScale.Client/ElasticScale.Common/InternalHelpers/ApplicationNameHelper.cs
@@ -1,16 +1,8 @@
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-#if NETFRAMEWORK
- using System.Data.SqlClient;
-#else
- using Microsoft.Data.SqlClient;
-#endif
using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
+using Microsoft.Data.SqlClient;
namespace Microsoft.Azure.SqlDatabase.ElasticScale
{
diff --git a/Src/ElasticScale.Client/ElasticScale.Common/InternalHelpers/SerializationHelper.cs b/Src/ElasticScale.Client/ElasticScale.Common/InternalHelpers/SerializationHelper.cs
index a0d6067..2cae3ff 100644
--- a/Src/ElasticScale.Client/ElasticScale.Common/InternalHelpers/SerializationHelper.cs
+++ b/Src/ElasticScale.Client/ElasticScale.Common/InternalHelpers/SerializationHelper.cs
@@ -1,14 +1,9 @@
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-using System;
-using System.Collections.Generic;
using System.Data.SqlTypes;
using System.IO;
-using System.Linq;
using System.Runtime.Serialization;
-using System.Text;
-using System.Threading.Tasks;
using System.Xml;
namespace Microsoft.Azure.SqlDatabase.ElasticScale
diff --git a/Src/ElasticScale.Client/ElasticScale.Common/Logging/ILogConfigWatcher.cs b/Src/ElasticScale.Client/ElasticScale.Common/Logging/ILogConfigWatcher.cs
index 5267863..37c7035 100644
--- a/Src/ElasticScale.Client/ElasticScale.Common/Logging/ILogConfigWatcher.cs
+++ b/Src/ElasticScale.Client/ElasticScale.Common/Logging/ILogConfigWatcher.cs
@@ -4,9 +4,6 @@
#region "Usings"
using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
#endregion
namespace Microsoft.Azure.SqlDatabase.ElasticScale
diff --git a/Src/ElasticScale.Client/ElasticScale.Common/Logging/ILogger.cs b/Src/ElasticScale.Client/ElasticScale.Common/Logging/ILogger.cs
index a963715..387bdf2 100644
--- a/Src/ElasticScale.Client/ElasticScale.Common/Logging/ILogger.cs
+++ b/Src/ElasticScale.Client/ElasticScale.Common/Logging/ILogger.cs
@@ -4,9 +4,6 @@
#region "Usings"
using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
#endregion
namespace Microsoft.Azure.SqlDatabase.ElasticScale
diff --git a/Src/ElasticScale.Client/ElasticScale.Common/Logging/LoggerFactory.cs b/Src/ElasticScale.Client/ElasticScale.Common/Logging/LoggerFactory.cs
index 09832f4..9a4c04b 100644
--- a/Src/ElasticScale.Client/ElasticScale.Common/Logging/LoggerFactory.cs
+++ b/Src/ElasticScale.Client/ElasticScale.Common/Logging/LoggerFactory.cs
@@ -4,12 +4,6 @@
// Purpose: Generic pluggable logger factory for retrieving configured
// logging objects
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading;
-
namespace Microsoft.Azure.SqlDatabase.ElasticScale
{
///
diff --git a/Src/ElasticScale.Client/ElasticScale.Common/Logging/TraceSource/ActivityIdScope.cs b/Src/ElasticScale.Client/ElasticScale.Common/Logging/TraceSource/ActivityIdScope.cs
index d76443f..3be29e9 100644
--- a/Src/ElasticScale.Client/ElasticScale.Common/Logging/TraceSource/ActivityIdScope.cs
+++ b/Src/ElasticScale.Client/ElasticScale.Common/Logging/TraceSource/ActivityIdScope.cs
@@ -5,7 +5,6 @@
// ActivityId via the using pattern
using System;
-using System.Diagnostics;
namespace Microsoft.Azure.SqlDatabase.ElasticScale
{
@@ -41,19 +40,6 @@ public void Dispose()
internal static class CorrelationManager
{
-#if NETFRAMEWORK
- public static Guid ActivityId
- {
- get
- {
- return Trace.CorrelationManager.ActivityId;
- }
- set
- {
- Trace.CorrelationManager.ActivityId = value;
- }
- }
-#else
[ThreadStatic]
private static Guid _activityId;
@@ -68,6 +54,5 @@ public static Guid ActivityId
_activityId = value;
}
}
-#endif
}
}
diff --git a/Src/ElasticScale.Client/ElasticScale.Common/Logging/TraceSource/TraceSourceFactory.cs b/Src/ElasticScale.Client/ElasticScale.Common/Logging/TraceSource/TraceSourceFactory.cs
index 756c029..ee5025f 100644
--- a/Src/ElasticScale.Client/ElasticScale.Common/Logging/TraceSource/TraceSourceFactory.cs
+++ b/Src/ElasticScale.Client/ElasticScale.Common/Logging/TraceSource/TraceSourceFactory.cs
@@ -5,11 +5,7 @@
using System;
using System.Collections.Concurrent;
-using System.Collections.Generic;
using System.Diagnostics;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
namespace Microsoft.Azure.SqlDatabase.ElasticScale
{
diff --git a/Src/ElasticScale.Client/ElasticScale.Common/Logging/TraceSource/TraceSourceWrapper.cs b/Src/ElasticScale.Client/ElasticScale.Common/Logging/TraceSource/TraceSourceWrapper.cs
index c3ec97e..b78f776 100644
--- a/Src/ElasticScale.Client/ElasticScale.Common/Logging/TraceSource/TraceSourceWrapper.cs
+++ b/Src/ElasticScale.Client/ElasticScale.Common/Logging/TraceSource/TraceSourceWrapper.cs
@@ -236,9 +236,6 @@ public void Critical(Exception exception, string format, params object[] vars)
///
public void TraceIn(string method, Guid activityId)
{
-#if NETFRAMEWORK
- _traceSource.TraceEvent(TraceEventType.Start, 0, "Start.{0}. ActivityId: {1}", method, activityId);
-#endif
}
///
@@ -248,9 +245,6 @@ public void TraceIn(string method, Guid activityId)
///
public void TraceOut(string method, Guid activityId)
{
-#if NETFRAMEWORK
- _traceSource.TraceEvent(TraceEventType.Stop, 0, "Stop.{0}. ActivityId: {1}", method, activityId);
-#endif
}
///
@@ -262,10 +256,6 @@ public void TraceOut(string method, Guid activityId)
///
public void TraceIn(string method, Guid activityId, string format, params object[] vars)
{
-#if NETFRAMEWORK
- string fmtMessage = string.Format(format, vars);
- _traceSource.TraceEvent(TraceEventType.Start, 0, "Start.{0}. {1}. ActivityId: {2}", method, fmtMessage, activityId);
-#endif
}
///
@@ -277,10 +267,6 @@ public void TraceIn(string method, Guid activityId, string format, params object
///
public void TraceOut(string method, Guid activityId, string format, params object[] vars)
{
-#if NETFRAMEWORK
- string fmtMessage = string.Format(format, vars);
- _traceSource.TraceEvent(TraceEventType.Stop, 0, "Stop.{0}. {1}. ActivityId: {2}", method, fmtMessage, activityId);
-#endif
}
#endregion
diff --git a/Src/ElasticScale.Client/ElasticScale.Common/TransientFaultHandling/Implementation/Guard.cs b/Src/ElasticScale.Client/ElasticScale.Common/TransientFaultHandling/Implementation/Guard.cs
index 626e79f..c96a7f3 100644
--- a/Src/ElasticScale.Client/ElasticScale.Common/TransientFaultHandling/Implementation/Guard.cs
+++ b/Src/ElasticScale.Client/ElasticScale.Common/TransientFaultHandling/Implementation/Guard.cs
@@ -3,9 +3,9 @@
namespace Microsoft.Azure.SqlDatabase.ElasticScale
{
- using Microsoft.Practices.EnterpriseLibrary.TransientFaultHandling.Properties;
using System;
using System.Globalization;
+ using Microsoft.Practices.EnterpriseLibrary.TransientFaultHandling.Properties;
internal partial class TransientFaultHandling
{
diff --git a/Src/ElasticScale.Client/ElasticScale.Common/TransientFaultHandling/Implementation/RetryLimitExceededException.cs b/Src/ElasticScale.Client/ElasticScale.Common/TransientFaultHandling/Implementation/RetryLimitExceededException.cs
index 6dbcf87..958e37f 100644
--- a/Src/ElasticScale.Client/ElasticScale.Common/TransientFaultHandling/Implementation/RetryLimitExceededException.cs
+++ b/Src/ElasticScale.Client/ElasticScale.Common/TransientFaultHandling/Implementation/RetryLimitExceededException.cs
@@ -3,9 +3,8 @@
namespace Microsoft.Azure.SqlDatabase.ElasticScale
{
- using Microsoft.Practices.EnterpriseLibrary.TransientFaultHandling.Properties;
using System;
- using System.Runtime.Serialization;
+ using Microsoft.Practices.EnterpriseLibrary.TransientFaultHandling.Properties;
internal partial class TransientFaultHandling
{
diff --git a/Src/ElasticScale.Client/ElasticScale.Common/TransientFaultHandling/Implementation/SqlDatabaseTransientErrorDetectionStrategy.cs b/Src/ElasticScale.Client/ElasticScale.Common/TransientFaultHandling/Implementation/SqlDatabaseTransientErrorDetectionStrategy.cs
index c03cfa9..d9c2605 100644
--- a/Src/ElasticScale.Client/ElasticScale.Common/TransientFaultHandling/Implementation/SqlDatabaseTransientErrorDetectionStrategy.cs
+++ b/Src/ElasticScale.Client/ElasticScale.Common/TransientFaultHandling/Implementation/SqlDatabaseTransientErrorDetectionStrategy.cs
@@ -12,11 +12,7 @@
using System;
using System.ComponentModel;
-#if NETFRAMEWORK
- using System.Data.SqlClient;
-#else
- using Microsoft.Data.SqlClient;
-#endif
+using Microsoft.Data.SqlClient;
namespace Microsoft.Azure.SqlDatabase.ElasticScale
{
diff --git a/Src/ElasticScale.Client/ElasticScale.Common/TransientFaultHandling/Implementation/ThrottlingCondition.cs b/Src/ElasticScale.Client/ElasticScale.Common/TransientFaultHandling/Implementation/ThrottlingCondition.cs
index 572f0a0..2daa06f 100644
--- a/Src/ElasticScale.Client/ElasticScale.Common/TransientFaultHandling/Implementation/ThrottlingCondition.cs
+++ b/Src/ElasticScale.Client/ElasticScale.Common/TransientFaultHandling/Implementation/ThrottlingCondition.cs
@@ -12,15 +12,11 @@
using System;
using System.Collections.Generic;
-#if NETFRAMEWORK
- using System.Data.SqlClient;
-#else
- using Microsoft.Data.SqlClient;
-#endif
using System.Globalization;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
+using Microsoft.Data.SqlClient;
namespace Microsoft.Azure.SqlDatabase.ElasticScale
{
diff --git a/Src/ElasticScale.Client/ElasticScale.Common/packages.config b/Src/ElasticScale.Client/ElasticScale.Common/packages.config
deleted file mode 100644
index 3fbe011..0000000
--- a/Src/ElasticScale.Client/ElasticScale.Common/packages.config
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
-
\ No newline at end of file
diff --git a/Src/ElasticScale.Client/Microsoft.Azure.SqlDatabase.ElasticScale.Client.csproj b/Src/ElasticScale.Client/Microsoft.Azure.SqlDatabase.ElasticScale.Client.csproj
index b843492..03b7dd6 100644
--- a/Src/ElasticScale.Client/Microsoft.Azure.SqlDatabase.ElasticScale.Client.csproj
+++ b/Src/ElasticScale.Client/Microsoft.Azure.SqlDatabase.ElasticScale.Client.csproj
@@ -1,16 +1,16 @@
-
+
This client library allows ADO.NET developers to create applications that implement and use the pattern known as database sharding in Azure SQL Database. Sharding is a scale-out strategy that spreads data across a number of independent databases. The library includes APIs for creating and managing shard maps, routing SQL operations to the appropriate shard, and performing queries that cross many shards. To learn more about elastic database tools, check out http://azure.microsoft.com/en-us/documentation/articles/sql-database-elastic-scale-documentation-map/.
© Microsoft Corporation. All rights reserved.
Microsoft Azure SQL Database: Elastic Database Client Library
en-US
- 2.4.0-preview1
+ 3.0.0
Microsoft
- net451;net46;netstandard2.0
+ net5.0
Microsoft;Elastic;Scale;Azure;SQL;DB;Database;Shard;Sharding;Management;Query;azureofficial
- Added support for SqlConnection.AccessToken. This can be provided by using OpenConnection methods that receive SqlConnectionInfo parameter. Using AccessToken requires .NET 4.6 or higher, or .NET Standard with System.Data.SqlClient 4.6 or higher.
- Icon.png
+ Updated to net5.0 and migrated from System.Data.SqlClient to Microsoft.Data.SqlClient.
+ http://go.microsoft.com/fwlink/?LinkID=288890
https://github.com/Azure/elastic-db-tools
MIT
true
@@ -23,6 +23,10 @@
+
+
+
+
diff --git a/Src/ElasticScale.Client/Properties/AssemblyInfo.cs b/Src/ElasticScale.Client/Properties/AssemblyInfo.cs
index a127e29..419d6f7 100644
--- a/Src/ElasticScale.Client/Properties/AssemblyInfo.cs
+++ b/Src/ElasticScale.Client/Properties/AssemblyInfo.cs
@@ -2,8 +2,6 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System;
-using System.Reflection;
-using System.Resources;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
diff --git a/Src/ElasticScale.Client/Query/App.config b/Src/ElasticScale.Client/Query/App.config
deleted file mode 100644
index f875893..0000000
--- a/Src/ElasticScale.Client/Query/App.config
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Src/ElasticScale.Client/Query/DbCommandExtensions.cs b/Src/ElasticScale.Client/Query/DbCommandExtensions.cs
index 6a58c25..95ba99b 100644
--- a/Src/ElasticScale.Client/Query/DbCommandExtensions.cs
+++ b/Src/ElasticScale.Client/Query/DbCommandExtensions.cs
@@ -1,16 +1,10 @@
using System;
-using System.Collections.Generic;
using System.Data.Common;
-#if NETFRAMEWORK
- using System.Data.SqlClient;
-#else
- using Microsoft.Data.SqlClient;
-#endif
using System.Linq;
-using System.Reflection;
-using System.Threading.Tasks;
+using Microsoft.Data.SqlClient;
-namespace Microsoft.Azure.SqlDatabase.ElasticScale.Query {
+namespace Microsoft.Azure.SqlDatabase.ElasticScale.Query
+{
public static class DbCommandExtensions {
///
diff --git a/Src/ElasticScale.Client/Query/Exceptions/MultiShardException.cs b/Src/ElasticScale.Client/Query/Exceptions/MultiShardException.cs
index 675c1b7..8c64223 100644
--- a/Src/ElasticScale.Client/Query/Exceptions/MultiShardException.cs
+++ b/Src/ElasticScale.Client/Query/Exceptions/MultiShardException.cs
@@ -4,10 +4,10 @@
// Purpose:
// Public type to communicate failures when performing operations against a shard
-using Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement;
using System;
using System.Globalization;
using System.Runtime.Serialization;
+using Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement;
namespace Microsoft.Azure.SqlDatabase.ElasticScale.Query
{
diff --git a/Src/ElasticScale.Client/Query/Exceptions/MultiShardPartialReadException.cs b/Src/ElasticScale.Client/Query/Exceptions/MultiShardPartialReadException.cs
index 2a7a2c0..e0d1de1 100644
--- a/Src/ElasticScale.Client/Query/Exceptions/MultiShardPartialReadException.cs
+++ b/Src/ElasticScale.Client/Query/Exceptions/MultiShardPartialReadException.cs
@@ -9,9 +9,9 @@
//
// Notes:
-using Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement;
using System;
using System.Runtime.Serialization;
+using Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement;
namespace Microsoft.Azure.SqlDatabase.ElasticScale.Query
{
diff --git a/Src/ElasticScale.Client/Query/LabeledDbDataReader.cs b/Src/ElasticScale.Client/Query/LabeledDbDataReader.cs
index 4bbcc1a..b2e9b12 100644
--- a/Src/ElasticScale.Client/Query/LabeledDbDataReader.cs
+++ b/Src/ElasticScale.Client/Query/LabeledDbDataReader.cs
@@ -11,11 +11,6 @@
using System;
using System.Data.Common;
-#if NETFRAMEWORK
- using System.Data.SqlClient;
-#else
- using Microsoft.Data.SqlClient;
-#endif
using Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement;
namespace Microsoft.Azure.SqlDatabase.ElasticScale.Query
diff --git a/Src/ElasticScale.Client/Query/Logging/TraceHelper.cs b/Src/ElasticScale.Client/Query/Logging/TraceHelper.cs
index 5df8802..9c1be43 100644
--- a/Src/ElasticScale.Client/Query/Logging/TraceHelper.cs
+++ b/Src/ElasticScale.Client/Query/Logging/TraceHelper.cs
@@ -5,7 +5,6 @@
// Trace helper for CrossShardQuery
using System;
-using System.Diagnostics;
namespace Microsoft.Azure.SqlDatabase.ElasticScale.Query
{
diff --git a/Src/ElasticScale.Client/Query/MultiShardCommand.cs b/Src/ElasticScale.Client/Query/MultiShardCommand.cs
index 545a6e1..dd49c21 100644
--- a/Src/ElasticScale.Client/Query/MultiShardCommand.cs
+++ b/Src/ElasticScale.Client/Query/MultiShardCommand.cs
@@ -16,11 +16,6 @@
using System.Collections.Generic;
using System.Data;
using System.Data.Common;
-#if NETFRAMEWORK
- using System.Data.SqlClient;
-#else
- using Microsoft.Data.SqlClient;
-#endif
using System.Diagnostics;
using System.Diagnostics.Contracts;
using System.IO;
@@ -29,6 +24,7 @@
using System.Threading.Tasks;
using System.Xml;
using Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement;
+using Microsoft.Data.SqlClient;
namespace Microsoft.Azure.SqlDatabase.ElasticScale.Query
{
diff --git a/Src/ElasticScale.Client/Query/MultiShardConnection.cs b/Src/ElasticScale.Client/Query/MultiShardConnection.cs
index ba69be9..0df0084 100644
--- a/Src/ElasticScale.Client/Query/MultiShardConnection.cs
+++ b/Src/ElasticScale.Client/Query/MultiShardConnection.cs
@@ -12,13 +12,9 @@
using System.Collections.Generic;
using System.Data;
using System.Data.Common;
-#if NETFRAMEWORK
- using System.Data.SqlClient;
-#else
- using Microsoft.Data.SqlClient;
-#endif
using System.Linq;
using Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement;
+using Microsoft.Data.SqlClient;
namespace Microsoft.Azure.SqlDatabase.ElasticScale.Query
{
diff --git a/Src/ElasticScale.Client/Query/MultiShardDataReader.cs b/Src/ElasticScale.Client/Query/MultiShardDataReader.cs
index f663ea0..7df8a09 100644
--- a/Src/ElasticScale.Client/Query/MultiShardDataReader.cs
+++ b/Src/ElasticScale.Client/Query/MultiShardDataReader.cs
@@ -17,22 +17,15 @@
using System.Collections.Generic;
using System.Data;
using System.Data.Common;
-#if NETFRAMEWORK
- using System.Data.SqlClient;
-#else
- using Microsoft.Data.SqlClient;
-#endif
using System.Data.SqlTypes;
using System.Diagnostics;
using System.Diagnostics.Contracts;
using System.IO;
-#if NETFRAMEWORK
-using System.Runtime.Remoting;
-#endif
using System.Threading;
using System.Threading.Tasks;
using System.Xml;
using Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement;
+using Microsoft.Data.SqlClient;
// DEVNOTE (VSTS 2202707): This should go into the namespace that we are using for all the Wrapper classes. Since we aren't integrated
// with those classes yet, we'll just use this namespace and have it change later when we integrate.
@@ -246,17 +239,6 @@ public override void Close()
}
}
-#if NETFRAMEWORK
- ///
- /// This method is currently not supported. Invoking the method will result in an exception.
- ///
- /// The of the object that the new will reference.
- public override ObjRef CreateObjRef(Type requestedType)
- {
- throw new RemotingException("MultiShardDataReader is not a valid remoting object.");
- }
-#endif
-
///
/// Determines whether the specified object is equal to the current object. (Inherited from .)
///
@@ -919,14 +901,6 @@ public XmlReader GetXmlReader(int ordinal)
return GetColumn(GetCurrentDataReaderAsSqlDataReader().GetXmlReader, ordinal);
}
- ///
- /// This method is currently not supported. Invoking the method will result in an exception.
- ///
- public override object InitializeLifetimeService()
- {
- throw new NotSupportedException("InitializeLifetimeService is currently not supported");
- }
-
///
/// Gets a value that indicates whether the column contains nonexistent or missing values (NULL values).
///
diff --git a/Src/ElasticScale.Client/Query/ShardExecutionEventArgs.cs b/Src/ElasticScale.Client/Query/ShardExecutionEventArgs.cs
index 2acb05d..7ac321d 100644
--- a/Src/ElasticScale.Client/Query/ShardExecutionEventArgs.cs
+++ b/Src/ElasticScale.Client/Query/ShardExecutionEventArgs.cs
@@ -1,12 +1,8 @@
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-using Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement;
using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
+using Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement;
namespace Microsoft.Azure.SqlDatabase.ElasticScale.Query
{
diff --git a/Src/ElasticScale.Client/Query/packages.config b/Src/ElasticScale.Client/Query/packages.config
deleted file mode 100644
index 6b8deb9..0000000
--- a/Src/ElasticScale.Client/Query/packages.config
+++ /dev/null
@@ -1,3 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/Src/ElasticScale.Client/ShardManagement/Cache/CacheListMapper.cs b/Src/ElasticScale.Client/ShardManagement/Cache/CacheListMapper.cs
index 67e4ffd..b6e807f 100644
--- a/Src/ElasticScale.Client/ShardManagement/Cache/CacheListMapper.cs
+++ b/Src/ElasticScale.Client/ShardManagement/Cache/CacheListMapper.cs
@@ -1,9 +1,7 @@
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-using System;
using System.Collections.Generic;
-using System.Diagnostics;
namespace Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement
{
diff --git a/Src/ElasticScale.Client/ShardManagement/Cache/CacheMapper.cs b/Src/ElasticScale.Client/ShardManagement/Cache/CacheMapper.cs
index 8091af2..da9de8a 100644
--- a/Src/ElasticScale.Client/ShardManagement/Cache/CacheMapper.cs
+++ b/Src/ElasticScale.Client/ShardManagement/Cache/CacheMapper.cs
@@ -2,7 +2,6 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System;
-using System.Collections.Generic;
namespace Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement
{
diff --git a/Src/ElasticScale.Client/ShardManagement/Cache/CacheRangeMapper.cs b/Src/ElasticScale.Client/ShardManagement/Cache/CacheRangeMapper.cs
index c049179..83873a0 100644
--- a/Src/ElasticScale.Client/ShardManagement/Cache/CacheRangeMapper.cs
+++ b/Src/ElasticScale.Client/ShardManagement/Cache/CacheRangeMapper.cs
@@ -1,9 +1,7 @@
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-using System;
using System.Collections.Generic;
-using System.Diagnostics;
namespace Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement
{
diff --git a/Src/ElasticScale.Client/ShardManagement/Cache/PerfCounterInstance.cs b/Src/ElasticScale.Client/ShardManagement/Cache/PerfCounterInstance.cs
index 520b393..72a3214 100644
--- a/Src/ElasticScale.Client/ShardManagement/Cache/PerfCounterInstance.cs
+++ b/Src/ElasticScale.Client/ShardManagement/Cache/PerfCounterInstance.cs
@@ -2,12 +2,6 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System;
-using System.Collections.Generic;
-using System.Diagnostics;
-using System.Linq;
-using System.Security.Principal;
-using System.Text;
-using System.Threading.Tasks;
namespace Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement
{
@@ -31,40 +25,6 @@ internal enum PerformanceCounterName
///
internal struct PerfCounterCreationData
{
-#if NETFRAMEWORK
- private PerformanceCounterName counterName;
- private PerformanceCounterType counterType;
- private string counterDisplayName;
- private string counterHelpText;
-
- public PerfCounterCreationData(PerformanceCounterName name, PerformanceCounterType type, string displayName, string helpText)
- {
- counterName = name;
- counterType = type;
- counterDisplayName = displayName;
- counterHelpText = helpText;
- }
-
- public PerformanceCounterName CounterName
- {
- get { return counterName; }
- }
-
- public PerformanceCounterType CounterType
- {
- get { return counterType; }
- }
-
- public string CounterDisplayName
- {
- get { return counterDisplayName; }
- }
-
- public string CounterHelpText
- {
- get { return counterHelpText; }
- }
-#endif
}
///
@@ -72,120 +32,12 @@ public string CounterHelpText
///
internal class PerfCounterInstance : IDisposable
{
-#if NETFRAMEWORK
- private static object _lockObject = new object();
-
- private static ILogger Tracer
- {
- get
- {
- return TraceHelper.Tracer;
- }
- }
-
- internal static readonly List counterList = new List()
- {
- new PerfCounterCreationData(PerformanceCounterName.MappingsCount, PerformanceCounterType.NumberOfItems64, PerformanceCounters.MappingsCountDisplayName, PerformanceCounters.MappingsCountHelpText),
- new PerfCounterCreationData(PerformanceCounterName.MappingsAddOrUpdatePerSec, PerformanceCounterType.RateOfCountsPerSecond64, PerformanceCounters.MappingsAddOrUpdatePerSecDisplayName, PerformanceCounters.MappingsAddOrUpdatePerSecHelpText),
- new PerfCounterCreationData(PerformanceCounterName.MappingsRemovePerSec, PerformanceCounterType.RateOfCountsPerSecond64, PerformanceCounters.MappingsRemovePerSecDisplayName, PerformanceCounters.MappingsRemovePerSecHelpText),
- new PerfCounterCreationData(PerformanceCounterName.MappingsLookupSucceededPerSec, PerformanceCounterType.RateOfCountsPerSecond64, PerformanceCounters.MappingsLookupSucceededPerSecDisplayName, PerformanceCounters.MappingsLookupSucceededPerSecHelpText),
- new PerfCounterCreationData(PerformanceCounterName.MappingsLookupFailedPerSec, PerformanceCounterType.RateOfCountsPerSecond64, PerformanceCounters.MappingsLookupFailedPerSecDisplayName, PerformanceCounters.MappingsLookupFailedPerSecHelpText),
-
- new PerfCounterCreationData(PerformanceCounterName.DdrOperationsPerSec, PerformanceCounterType.RateOfCountsPerSecond64, PerformanceCounters.DdrOperationsPerSecDisplayName, PerformanceCounters.DdrOperationsPerSecHelpText),
- };
-
- private Dictionary _counters;
-
- private bool _initialized;
-
- private string _instanceName;
-#endif
-
///
/// Initialize perf counter instance based on shard map name
///
///
public PerfCounterInstance(string shardMapName)
{
-#if NETFRAMEWORK
- _initialized = false;
-
- _instanceName = string.Concat(Process.GetCurrentProcess().Id.ToString(), "-", shardMapName);
-
- try
- {
- // check if caller has permissions to create performance counters.
- if (!PerfCounterInstance.HasCreatePerformanceCounterPermissions())
- {
- // Trace out warning and continue
- Tracer.TraceWarning(TraceSourceConstants.ComponentNames.PerfCounter,
- "create",
- "User does not have permissions to create performance counters, no performance data will be collected.");
- }
- else
- {
- // check if PerformanceCounterCategory exists
-
- if (!PerformanceCounterCategory.Exists(PerformanceCounters.ShardManagementPerformanceCounterCategory))
- {
- // We are not creating performance counter category here as per recommendation in documentation, copying note from
- // https://msdn.microsoft.com/en-us/library/sb32hxtc(v=vs.110).aspx
- // It is strongly recommended that new performance counter categories be created
- // during the installation of the application, not during the execution of the application.
- // This allows time for the operating system to refresh its list of registered performance counter categories.
- // If the list has not been refreshed, the attempt to use the category will fail.
-
- // Trace out warning and continue
- Tracer.TraceWarning(TraceSourceConstants.ComponentNames.PerfCounter,
- "create",
- "Performance counter category {0} does not exist, no performance data will be collected.",
- PerformanceCounters.ShardManagementPerformanceCounterCategory);
- }
- else
- {
- // Check if specific instance exists
- if (PerformanceCounterCategory.InstanceExists(_instanceName,
- PerformanceCounters.ShardManagementPerformanceCounterCategory))
- {
- // As performance counters are created with Process lifetime and instance name is unique (PID + shard map name),
- // this should never happen. Trace out error and silently continue.
- Tracer.TraceWarning(TraceSourceConstants.ComponentNames.PerfCounter,
- "create",
- "Performance counter instance {0} already exists, no performance data will be collected.",
- _instanceName);
- }
- else
- {
- // now initialize all counters for this instance
- _counters = new Dictionary();
-
- foreach (PerfCounterCreationData d in PerfCounterInstance.counterList)
- {
- _counters.Add(d.CounterName,
- new PerformanceCounterWrapper(
- PerformanceCounters.ShardManagementPerformanceCounterCategory, _instanceName,
- d.CounterDisplayName));
- }
-
- // check that atleast one performance counter was created, so that we can remove instance as part of Dispose()
- _initialized = _counters.Any(c => c.Value._isValid = true);
- }
- }
- }
- }
- catch (Exception e)
- {
- // Note: If any of the initialization calls throws, log the exception and silently continue.
- // No perf data will be collected in this case.
- // All other non-static code paths access PerformanceCounter and PerformanceCounterCategory
- // objects only if _initialized is set to true.
-
- Tracer.TraceWarning(TraceSourceConstants.ComponentNames.PerfCounter,
- "PerfCounterInstance..ctor",
- "Exception caught while creating performance counter instance, no performance data will be collected. Exception: {0}",
- e.ToString());
- }
-#endif
}
///
@@ -194,16 +46,6 @@ public PerfCounterInstance(string shardMapName)
/// Counter to increment.
internal void IncrementCounter(PerformanceCounterName counterName)
{
-#if NETFRAMEWORK
- if (_initialized)
- {
- PerformanceCounterWrapper pc;
- if (_counters.TryGetValue(counterName, out pc))
- {
- pc.Increment();
- }
- }
-#endif
}
///
@@ -213,16 +55,6 @@ internal void IncrementCounter(PerformanceCounterName counterName)
/// New value.
internal void SetCounter(PerformanceCounterName counterName, long value)
{
-#if NETFRAMEWORK
- if (_initialized)
- {
- PerformanceCounterWrapper pc;
- if (_counters.TryGetValue(counterName, out pc))
- {
- pc.SetRawValue(value);
- }
- }
-#endif
}
///
@@ -230,93 +62,13 @@ internal void SetCounter(PerformanceCounterName counterName, long value)
///
internal static void CreatePerformanceCategoryAndCounters()
{
-#if NETFRAMEWORK
- // Creation of performance counters need Administrator privilege
- if (HasCreatePerformanceCategoryPermissions())
- {
- // Delete performance counter category, if exists.
- if (PerformanceCounterCategory.Exists(PerformanceCounters.ShardManagementPerformanceCounterCategory))
- {
- PerformanceCounterCategory.Delete(PerformanceCounters.ShardManagementPerformanceCounterCategory);
- }
-
- CounterCreationDataCollection smmCounters = new CounterCreationDataCollection();
-
- foreach (PerfCounterCreationData d in PerfCounterInstance.counterList)
- {
- smmCounters.Add(new CounterCreationData(d.CounterDisplayName, d.CounterHelpText, d.CounterType));
- }
-
- PerformanceCounterCategory.Create(
- PerformanceCounters.ShardManagementPerformanceCounterCategory,
- PerformanceCounters.ShardManagementPerformanceCounterCategoryHelp,
- PerformanceCounterCategoryType.MultiInstance,
- smmCounters);
- }
- else
- {
- // Trace out warning and continue
- Tracer.TraceWarning(TraceSourceConstants.ComponentNames.PerfCounter,
- "createCategory",
- "User does not have permissions to create performance counter category");
- }
-#endif
- }
-
-#if NETFRAMEWORK
- ///
- /// Check if caller has permissions to create performance counter catagory.
- ///
- /// If caller can create performance counter catagory
- internal static bool HasCreatePerformanceCategoryPermissions()
- {
- // PerformanceCounterCategory creation requires user to be part of Administrators group.
-
- WindowsPrincipal wp = new WindowsPrincipal(WindowsIdentity.GetCurrent());
- return wp.IsInRole(WindowsBuiltInRole.Administrator);
- }
-
- ///
- /// Check if caller has permissions to create performance counter instance
- ///
- /// If caller can create performance counter instance.
- internal static bool HasCreatePerformanceCounterPermissions()
- {
- // PerformanceCounter creation requires user to be part of Administrators or 'Performance Monitor Users' local group.
- WindowsPrincipal wp = new WindowsPrincipal(WindowsIdentity.GetCurrent());
- return wp.IsInRole(WindowsBuiltInRole.Administrator) || wp.IsInRole(PerformanceCounters.PerformanceMonitorUsersGroupName);
}
-#endif
///
/// Dispose performance counter instance
///
public void Dispose()
{
-#if NETFRAMEWORK
- if (_initialized)
- {
- lock (_lockObject)
- {
- // If performance counter instance exists, remove it here.
- if (_initialized)
- {
- // We can assume here that performance counter catagory, instance and first counter in the cointerList exist as _initialized is set to true.
- using (PerformanceCounter pcRemove = new PerformanceCounter())
- {
- pcRemove.CategoryName = PerformanceCounters.ShardManagementPerformanceCounterCategory;
- pcRemove.CounterName = counterList.First().CounterDisplayName;
- pcRemove.InstanceName = _instanceName;
- pcRemove.InstanceLifetime = PerformanceCounterInstanceLifetime.Process;
- pcRemove.ReadOnly = false;
- // Removing instance using a single counter removes all counters for that instance.
- pcRemove.RemoveInstance();
- }
- }
- _initialized = false;
- }
- }
-#endif
}
}
}
diff --git a/Src/ElasticScale.Client/ShardManagement/Cache/PerformanceCounterWrapper.cs b/Src/ElasticScale.Client/ShardManagement/Cache/PerformanceCounterWrapper.cs
index 9e0fdec..8c9b5e0 100644
--- a/Src/ElasticScale.Client/ShardManagement/Cache/PerformanceCounterWrapper.cs
+++ b/Src/ElasticScale.Client/ShardManagement/Cache/PerformanceCounterWrapper.cs
@@ -2,11 +2,6 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System;
-using System.Collections.Generic;
-using System.Diagnostics;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
namespace Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement
{
@@ -23,10 +18,6 @@ private static ILogger Tracer
}
}
-#if NETFRAMEWORK
- private PerformanceCounter _counter;
-#endif
-
internal bool _isValid;
private string _counterName;
@@ -48,37 +39,6 @@ public PerformanceCounterWrapper(string categoryName, string instanceName, strin
this._categoryName = categoryName;
this._instanceName = instanceName;
this._counterName = counterName;
-
-#if NETFRAMEWORK
- // Check if counter exists in the specified category and then create its instance
- if (PerformanceCounterCategory.CounterExists(_counterName, _categoryName))
- {
- try
- {
- _counter = new PerformanceCounter();
- _counter.InstanceLifetime = PerformanceCounterInstanceLifetime.Process;
- _counter.CategoryName = _categoryName;
- _counter.InstanceName = _instanceName;
- _counter.CounterName = _counterName;
- _counter.ReadOnly = false;
-
- _counter.RawValue = 0;
-
- _isValid = true;
- }
- catch (Exception e)
- {
- PerformanceCounterWrapper.TraceException("initialize", "Performance counter initialization failed, no data will be collected.", e);
- }
- }
- else
- {
- Tracer.TraceWarning(
- TraceSourceConstants.ComponentNames.PerfCounter,
- "initialize",
- "Performance counter {0} does not exist in shard management catagory.", counterName);
- }
-#endif
}
///
@@ -86,12 +46,6 @@ public PerformanceCounterWrapper(string categoryName, string instanceName, strin
///
public void Close()
{
-#if NETFRAMEWORK
- if (_isValid)
- {
- _counter.Close();
- }
-#endif
}
///
@@ -100,19 +54,6 @@ public void Close()
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes")]
public void Increment()
{
-#if NETFRAMEWORK
- if (_isValid)
- {
- try
- {
- _counter.Increment();
- }
- catch (Exception e)
- {
- PerformanceCounterWrapper.TraceException("increment", "counter increment failed.", e);
- }
- }
-#endif
}
///
@@ -122,19 +63,6 @@ public void Increment()
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes")]
public void SetRawValue(long value)
{
-#if NETFRAMEWORK
- if (_isValid)
- {
- try
- {
- _counter.RawValue = value;
- }
- catch (Exception e)
- {
- PerformanceCounterWrapper.TraceException("SetRawValue", "failed to set raw value", e);
- }
- }
-#endif
}
///
@@ -156,9 +84,6 @@ private static void TraceException(string method, string message, Exception e)
///
public void Dispose()
{
-#if NETFRAMEWORK
- _counter.Dispose();
-#endif
}
}
}
\ No newline at end of file
diff --git a/Src/ElasticScale.Client/ShardManagement/Logging/TraceHelper.cs b/Src/ElasticScale.Client/ShardManagement/Logging/TraceHelper.cs
index 288b59a..9569641 100644
--- a/Src/ElasticScale.Client/ShardManagement/Logging/TraceHelper.cs
+++ b/Src/ElasticScale.Client/ShardManagement/Logging/TraceHelper.cs
@@ -2,7 +2,6 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System;
-using System.Diagnostics;
namespace Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement
{
diff --git a/Src/ElasticScale.Client/ShardManagement/Recovery/MappingComparisonUtils.cs b/Src/ElasticScale.Client/ShardManagement/Recovery/MappingComparisonUtils.cs
index 2b268e4..b44bc83 100644
--- a/Src/ElasticScale.Client/ShardManagement/Recovery/MappingComparisonUtils.cs
+++ b/Src/ElasticScale.Client/ShardManagement/Recovery/MappingComparisonUtils.cs
@@ -2,9 +2,8 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System.Collections.Generic;
-using System.Collections;
-using System.Linq;
using System.Diagnostics;
+using System.Linq;
namespace Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement.Recovery
{
diff --git a/Src/ElasticScale.Client/ShardManagement/SchemaInformation/ReferenceTableInfo.cs b/Src/ElasticScale.Client/ShardManagement/SchemaInformation/ReferenceTableInfo.cs
index 5af67cd..8a4bb35 100644
--- a/Src/ElasticScale.Client/ShardManagement/SchemaInformation/ReferenceTableInfo.cs
+++ b/Src/ElasticScale.Client/ShardManagement/SchemaInformation/ReferenceTableInfo.cs
@@ -2,11 +2,7 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System;
-using System.Collections.Generic;
-using System.Linq;
using System.Runtime.Serialization;
-using System.Text;
-using System.Threading.Tasks;
namespace Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement.Schema
{
diff --git a/Src/ElasticScale.Client/ShardManagement/SchemaInformation/SchemaInfo.cs b/Src/ElasticScale.Client/ShardManagement/SchemaInformation/SchemaInfo.cs
index a873ae1..f734948 100644
--- a/Src/ElasticScale.Client/ShardManagement/SchemaInformation/SchemaInfo.cs
+++ b/Src/ElasticScale.Client/ShardManagement/SchemaInformation/SchemaInfo.cs
@@ -7,8 +7,6 @@
using System.Diagnostics;
using System.Linq;
using System.Runtime.Serialization;
-using System.Text;
-using System.Threading.Tasks;
namespace Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement.Schema
{
diff --git a/Src/ElasticScale.Client/ShardManagement/SchemaInformation/SchemaInfoCollection.cs b/Src/ElasticScale.Client/ShardManagement/SchemaInformation/SchemaInfoCollection.cs
index ebfe7ed..5eaedd6 100644
--- a/Src/ElasticScale.Client/ShardManagement/SchemaInformation/SchemaInfoCollection.cs
+++ b/Src/ElasticScale.Client/ShardManagement/SchemaInformation/SchemaInfoCollection.cs
@@ -3,8 +3,6 @@
using System.Collections;
using System.Collections.Generic;
-using System.Data.SqlTypes;
-using System.Diagnostics;
using System.Linq;
namespace Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement.Schema
diff --git a/Src/ElasticScale.Client/ShardManagement/SchemaInformation/SchemaInfoErrorCode.cs b/Src/ElasticScale.Client/ShardManagement/SchemaInformation/SchemaInfoErrorCode.cs
index 66f42e8..cca2004 100644
--- a/Src/ElasticScale.Client/ShardManagement/SchemaInformation/SchemaInfoErrorCode.cs
+++ b/Src/ElasticScale.Client/ShardManagement/SchemaInformation/SchemaInfoErrorCode.cs
@@ -1,8 +1,6 @@
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-using System;
-
namespace Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement.Schema
{
///
diff --git a/Src/ElasticScale.Client/ShardManagement/SchemaInformation/SchemaInfoException.cs b/Src/ElasticScale.Client/ShardManagement/SchemaInformation/SchemaInfoException.cs
index a4a3778..8fd945e 100644
--- a/Src/ElasticScale.Client/ShardManagement/SchemaInformation/SchemaInfoException.cs
+++ b/Src/ElasticScale.Client/ShardManagement/SchemaInformation/SchemaInfoException.cs
@@ -2,12 +2,8 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System;
-using System.Collections.Generic;
using System.Globalization;
-using System.Linq;
using System.Runtime.Serialization;
-using System.Text;
-using System.Threading.Tasks;
namespace Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement.Schema
{
diff --git a/Src/ElasticScale.Client/ShardManagement/SchemaInformation/ShardedTableInfo.cs b/Src/ElasticScale.Client/ShardManagement/SchemaInformation/ShardedTableInfo.cs
index e3b66d9..5a3a8f6 100644
--- a/Src/ElasticScale.Client/ShardManagement/SchemaInformation/ShardedTableInfo.cs
+++ b/Src/ElasticScale.Client/ShardManagement/SchemaInformation/ShardedTableInfo.cs
@@ -2,11 +2,7 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System;
-using System.Collections.Generic;
-using System.Linq;
using System.Runtime.Serialization;
-using System.Text;
-using System.Threading.Tasks;
namespace Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement.Schema
{
diff --git a/Src/ElasticScale.Client/ShardManagement/SchemaInformation/TableInfo.cs b/Src/ElasticScale.Client/ShardManagement/SchemaInformation/TableInfo.cs
index c18efe3..aad3697 100644
--- a/Src/ElasticScale.Client/ShardManagement/SchemaInformation/TableInfo.cs
+++ b/Src/ElasticScale.Client/ShardManagement/SchemaInformation/TableInfo.cs
@@ -1,12 +1,7 @@
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-using System;
-using System.Collections.Generic;
-using System.Linq;
using System.Runtime.Serialization;
-using System.Text;
-using System.Threading.Tasks;
namespace Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement.Schema
{
diff --git a/Src/ElasticScale.Client/ShardManagement/Shard/BaseMappingUpdate.cs b/Src/ElasticScale.Client/ShardManagement/Shard/BaseMappingUpdate.cs
index ad1e447..1e8e730 100644
--- a/Src/ElasticScale.Client/ShardManagement/Shard/BaseMappingUpdate.cs
+++ b/Src/ElasticScale.Client/ShardManagement/Shard/BaseMappingUpdate.cs
@@ -1,9 +1,6 @@
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-using System;
-using System.Diagnostics;
-
namespace Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement
{
///
diff --git a/Src/ElasticScale.Client/ShardManagement/Shard/IShardProvider.cs b/Src/ElasticScale.Client/ShardManagement/Shard/IShardProvider.cs
index b6a3722..876ca76 100644
--- a/Src/ElasticScale.Client/ShardManagement/Shard/IShardProvider.cs
+++ b/Src/ElasticScale.Client/ShardManagement/Shard/IShardProvider.cs
@@ -1,12 +1,8 @@
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-#if NETFRAMEWORK
- using System.Data.SqlClient;
-#else
- using Microsoft.Data.SqlClient;
-#endif
using System.Threading.Tasks;
+using Microsoft.Data.SqlClient;
namespace Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement
{
diff --git a/Src/ElasticScale.Client/ShardManagement/Shard/PointMapping.cs b/Src/ElasticScale.Client/ShardManagement/Shard/PointMapping.cs
index 1fd9a51..d75636a 100644
--- a/Src/ElasticScale.Client/ShardManagement/Shard/PointMapping.cs
+++ b/Src/ElasticScale.Client/ShardManagement/Shard/PointMapping.cs
@@ -2,13 +2,9 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System;
-#if NETFRAMEWORK
- using System.Data.SqlClient;
-#else
- using Microsoft.Data.SqlClient;
-#endif
using System.Diagnostics;
using System.Threading.Tasks;
+using Microsoft.Data.SqlClient;
namespace Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement
{
diff --git a/Src/ElasticScale.Client/ShardManagement/Shard/RangeMapping.cs b/Src/ElasticScale.Client/ShardManagement/Shard/RangeMapping.cs
index d36085d..038c7d1 100644
--- a/Src/ElasticScale.Client/ShardManagement/Shard/RangeMapping.cs
+++ b/Src/ElasticScale.Client/ShardManagement/Shard/RangeMapping.cs
@@ -2,13 +2,9 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System;
-#if NETFRAMEWORK
- using System.Data.SqlClient;
-#else
- using Microsoft.Data.SqlClient;
-#endif
using System.Diagnostics;
using System.Threading.Tasks;
+using Microsoft.Data.SqlClient;
namespace Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement
{
diff --git a/Src/ElasticScale.Client/ShardManagement/Shard/Shard.cs b/Src/ElasticScale.Client/ShardManagement/Shard/Shard.cs
index ade8328..2725182 100644
--- a/Src/ElasticScale.Client/ShardManagement/Shard/Shard.cs
+++ b/Src/ElasticScale.Client/ShardManagement/Shard/Shard.cs
@@ -2,13 +2,9 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System;
-#if NETFRAMEWORK
- using System.Data.SqlClient;
-#else
- using Microsoft.Data.SqlClient;
-#endif
using System.Diagnostics;
using System.Threading.Tasks;
+using Microsoft.Data.SqlClient;
namespace Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement
{
diff --git a/Src/ElasticScale.Client/ShardManagement/Shard/ShardLocation.cs b/Src/ElasticScale.Client/ShardManagement/Shard/ShardLocation.cs
index 7adcec2..c9a9c55 100644
--- a/Src/ElasticScale.Client/ShardManagement/Shard/ShardLocation.cs
+++ b/Src/ElasticScale.Client/ShardManagement/Shard/ShardLocation.cs
@@ -3,7 +3,6 @@
using System;
using System.Diagnostics;
-using System.Globalization;
namespace Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement
{
diff --git a/Src/ElasticScale.Client/ShardManagement/Shard/ValidationUtils.cs b/Src/ElasticScale.Client/ShardManagement/Shard/ValidationUtils.cs
index f5ac8d7..5945f5d 100644
--- a/Src/ElasticScale.Client/ShardManagement/Shard/ValidationUtils.cs
+++ b/Src/ElasticScale.Client/ShardManagement/Shard/ValidationUtils.cs
@@ -1,18 +1,13 @@
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-using System;
using System.Data;
-#if NETFRAMEWORK
- using System.Data.SqlClient;
-#else
- using Microsoft.Data.SqlClient;
-#endif
using System.Data.SqlTypes;
using System.Diagnostics;
using System.Threading.Tasks;
using System.Xml;
using System.Xml.Linq;
+using Microsoft.Data.SqlClient;
namespace Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement
{
diff --git a/Src/ElasticScale.Client/ShardManagement/ShardMap/ListShardMap.cs b/Src/ElasticScale.Client/ShardManagement/ShardMap/ListShardMap.cs
index 3f7ae6d..f49636e 100644
--- a/Src/ElasticScale.Client/ShardManagement/ShardMap/ListShardMap.cs
+++ b/Src/ElasticScale.Client/ShardManagement/ShardMap/ListShardMap.cs
@@ -3,13 +3,9 @@
using System;
using System.Collections.Generic;
-#if NETFRAMEWORK
- using System.Data.SqlClient;
-#else
- using Microsoft.Data.SqlClient;
-#endif
using System.Diagnostics;
using System.Threading.Tasks;
+using Microsoft.Data.SqlClient;
namespace Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement
{
diff --git a/Src/ElasticScale.Client/ShardManagement/ShardMap/RangeShardMap.cs b/Src/ElasticScale.Client/ShardManagement/ShardMap/RangeShardMap.cs
index 378fcc9..6cab1e1 100644
--- a/Src/ElasticScale.Client/ShardManagement/ShardMap/RangeShardMap.cs
+++ b/Src/ElasticScale.Client/ShardManagement/ShardMap/RangeShardMap.cs
@@ -3,13 +3,9 @@
using System;
using System.Collections.Generic;
-#if NETFRAMEWORK
- using System.Data.SqlClient;
-#else
- using Microsoft.Data.SqlClient;
-#endif
using System.Diagnostics;
using System.Threading.Tasks;
+using Microsoft.Data.SqlClient;
namespace Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement
{
diff --git a/Src/ElasticScale.Client/ShardManagement/ShardMap/ShardMap.cs b/Src/ElasticScale.Client/ShardManagement/ShardMap/ShardMap.cs
index 5a00344..55e9d39 100644
--- a/Src/ElasticScale.Client/ShardManagement/ShardMap/ShardMap.cs
+++ b/Src/ElasticScale.Client/ShardManagement/ShardMap/ShardMap.cs
@@ -3,13 +3,9 @@
using System;
using System.Collections.Generic;
-#if NETFRAMEWORK
- using System.Data.SqlClient;
-#else
- using Microsoft.Data.SqlClient;
-#endif
using System.Diagnostics;
using System.Threading.Tasks;
+using Microsoft.Data.SqlClient;
namespace Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement
{
diff --git a/Src/ElasticScale.Client/ShardManagement/ShardMap/ShardMapUtils.cs b/Src/ElasticScale.Client/ShardManagement/ShardMap/ShardMapUtils.cs
index 9cdc761..acf08de 100644
--- a/Src/ElasticScale.Client/ShardManagement/ShardMap/ShardMapUtils.cs
+++ b/Src/ElasticScale.Client/ShardManagement/ShardMap/ShardMapUtils.cs
@@ -2,14 +2,10 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System;
-#if NETFRAMEWORK
- using System.Data.SqlClient;
-#else
- using Microsoft.Data.SqlClient;
-#endif
using System.Diagnostics;
using System.Globalization;
using System.Reflection;
+using Microsoft.Data.SqlClient;
namespace Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement
{
diff --git a/Src/ElasticScale.Client/ShardManagement/ShardMapManager/ShardMapManagerFactory.cs b/Src/ElasticScale.Client/ShardManagement/ShardMapManager/ShardMapManagerFactory.cs
index 16db88d..103bf7e 100644
--- a/Src/ElasticScale.Client/ShardManagement/ShardMapManager/ShardMapManagerFactory.cs
+++ b/Src/ElasticScale.Client/ShardManagement/ShardMapManager/ShardMapManagerFactory.cs
@@ -2,12 +2,8 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System;
-#if NETFRAMEWORK
- using System.Data.SqlClient;
-#else
- using Microsoft.Data.SqlClient;
-#endif
using System.Diagnostics;
+using Microsoft.Data.SqlClient;
namespace Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement
{
diff --git a/Src/ElasticScale.Client/ShardManagement/ShardMapper/BaseShardMapper.cs b/Src/ElasticScale.Client/ShardManagement/ShardMapper/BaseShardMapper.cs
index 56fb797..d67c2e6 100644
--- a/Src/ElasticScale.Client/ShardManagement/ShardMapper/BaseShardMapper.cs
+++ b/Src/ElasticScale.Client/ShardManagement/ShardMapper/BaseShardMapper.cs
@@ -3,14 +3,10 @@
using System;
using System.Collections.Generic;
-#if NETFRAMEWORK
- using System.Data.SqlClient;
-#else
- using Microsoft.Data.SqlClient;
-#endif
using System.Diagnostics;
using System.Linq;
using System.Threading.Tasks;
+using Microsoft.Data.SqlClient;
namespace Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement
{
diff --git a/Src/ElasticScale.Client/ShardManagement/ShardMapper/DefaultShardMapper.cs b/Src/ElasticScale.Client/ShardManagement/ShardMapper/DefaultShardMapper.cs
index 1efa4cc..b1182a1 100644
--- a/Src/ElasticScale.Client/ShardManagement/ShardMapper/DefaultShardMapper.cs
+++ b/Src/ElasticScale.Client/ShardManagement/ShardMapper/DefaultShardMapper.cs
@@ -3,14 +3,10 @@
using System;
using System.Collections.Generic;
-#if NETFRAMEWORK
- using System.Data.SqlClient;
-#else
- using Microsoft.Data.SqlClient;
-#endif
using System.Diagnostics;
using System.Linq;
using System.Threading.Tasks;
+using Microsoft.Data.SqlClient;
namespace Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement
{
diff --git a/Src/ElasticScale.Client/ShardManagement/ShardMapper/HashShardMapper.cs b/Src/ElasticScale.Client/ShardManagement/ShardMapper/HashShardMapper.cs
index cbc8eb4..78a3981 100644
--- a/Src/ElasticScale.Client/ShardManagement/ShardMapper/HashShardMapper.cs
+++ b/Src/ElasticScale.Client/ShardManagement/ShardMapper/HashShardMapper.cs
@@ -1,9 +1,6 @@
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-using System;
-using System.Diagnostics;
-
namespace Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement
{
#if FUTUREWORK
diff --git a/Src/ElasticScale.Client/ShardManagement/ShardMapper/IShardMapper.cs b/Src/ElasticScale.Client/ShardManagement/ShardMapper/IShardMapper.cs
index a6e188d..6d67673 100644
--- a/Src/ElasticScale.Client/ShardManagement/ShardMapper/IShardMapper.cs
+++ b/Src/ElasticScale.Client/ShardManagement/ShardMapper/IShardMapper.cs
@@ -2,12 +2,8 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System;
-#if NETFRAMEWORK
- using System.Data.SqlClient;
-#else
- using Microsoft.Data.SqlClient;
-#endif
using System.Threading.Tasks;
+using Microsoft.Data.SqlClient;
namespace Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement
{
diff --git a/Src/ElasticScale.Client/ShardManagement/ShardMapper/ListShardMapper.cs b/Src/ElasticScale.Client/ShardManagement/ShardMapper/ListShardMapper.cs
index 9b3a219..8336741 100644
--- a/Src/ElasticScale.Client/ShardManagement/ShardMapper/ListShardMapper.cs
+++ b/Src/ElasticScale.Client/ShardManagement/ShardMapper/ListShardMapper.cs
@@ -3,12 +3,8 @@
using System;
using System.Collections.Generic;
-#if NETFRAMEWORK
- using System.Data.SqlClient;
-#else
- using Microsoft.Data.SqlClient;
-#endif
using System.Threading.Tasks;
+using Microsoft.Data.SqlClient;
namespace Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement
{
diff --git a/Src/ElasticScale.Client/ShardManagement/ShardMapper/RangeShardMapper.cs b/Src/ElasticScale.Client/ShardManagement/ShardMapper/RangeShardMapper.cs
index 59cbda2..64347d9 100644
--- a/Src/ElasticScale.Client/ShardManagement/ShardMapper/RangeShardMapper.cs
+++ b/Src/ElasticScale.Client/ShardManagement/ShardMapper/RangeShardMapper.cs
@@ -3,13 +3,9 @@
using System;
using System.Collections.Generic;
-#if NETFRAMEWORK
- using System.Data.SqlClient;
-#else
- using Microsoft.Data.SqlClient;
-#endif
using System.Linq;
using System.Threading.Tasks;
+using Microsoft.Data.SqlClient;
namespace Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement
{
diff --git a/Src/ElasticScale.Client/ShardManagement/SqlStore/SqlConnectionInfo.cs b/Src/ElasticScale.Client/ShardManagement/SqlStore/SqlConnectionInfo.cs
index dfd7ddb..a0fdb04 100644
--- a/Src/ElasticScale.Client/ShardManagement/SqlStore/SqlConnectionInfo.cs
+++ b/Src/ElasticScale.Client/ShardManagement/SqlStore/SqlConnectionInfo.cs
@@ -3,11 +3,7 @@
using System;
using System.Data.Common;
-#if NETFRAMEWORK
- using System.Data.SqlClient;
-#else
- using Microsoft.Data.SqlClient;
-#endif
+using Microsoft.Data.SqlClient;
namespace Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement
{
diff --git a/Src/ElasticScale.Client/ShardManagement/SqlStore/SqlLocation.cs b/Src/ElasticScale.Client/ShardManagement/SqlStore/SqlLocation.cs
index 9988fb1..903a72e 100644
--- a/Src/ElasticScale.Client/ShardManagement/SqlStore/SqlLocation.cs
+++ b/Src/ElasticScale.Client/ShardManagement/SqlStore/SqlLocation.cs
@@ -1,13 +1,7 @@
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-using System;
-#if NETFRAMEWORK
- using System.Data.SqlClient;
-#else
- using Microsoft.Data.SqlClient;
-#endif
-using System.Data.SqlTypes;
+using Microsoft.Data.SqlClient;
namespace Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement
{
diff --git a/Src/ElasticScale.Client/ShardManagement/SqlStore/SqlLogEntry.cs b/Src/ElasticScale.Client/ShardManagement/SqlStore/SqlLogEntry.cs
index a8ae38c..e23d7c0 100644
--- a/Src/ElasticScale.Client/ShardManagement/SqlStore/SqlLogEntry.cs
+++ b/Src/ElasticScale.Client/ShardManagement/SqlStore/SqlLogEntry.cs
@@ -2,12 +2,8 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System;
-#if NETFRAMEWORK
- using System.Data.SqlClient;
-#else
- using Microsoft.Data.SqlClient;
-#endif
using System.Data.SqlTypes;
+using Microsoft.Data.SqlClient;
namespace Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement
{
diff --git a/Src/ElasticScale.Client/ShardManagement/SqlStore/SqlMapping.cs b/Src/ElasticScale.Client/ShardManagement/SqlStore/SqlMapping.cs
index d788632..a8fab4a 100644
--- a/Src/ElasticScale.Client/ShardManagement/SqlStore/SqlMapping.cs
+++ b/Src/ElasticScale.Client/ShardManagement/SqlStore/SqlMapping.cs
@@ -2,11 +2,7 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System;
-#if NETFRAMEWORK
- using System.Data.SqlClient;
-#else
- using Microsoft.Data.SqlClient;
-#endif
+using Microsoft.Data.SqlClient;
namespace Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement
{
diff --git a/Src/ElasticScale.Client/ShardManagement/SqlStore/SqlResults.cs b/Src/ElasticScale.Client/ShardManagement/SqlStore/SqlResults.cs
index e7dee7d..7f111ea 100644
--- a/Src/ElasticScale.Client/ShardManagement/SqlStore/SqlResults.cs
+++ b/Src/ElasticScale.Client/ShardManagement/SqlStore/SqlResults.cs
@@ -3,13 +3,9 @@
using System;
using System.Collections.Generic;
-#if NETFRAMEWORK
- using System.Data.SqlClient;
-#else
- using Microsoft.Data.SqlClient;
-#endif
using System.Diagnostics;
using System.Threading.Tasks;
+using Microsoft.Data.SqlClient;
namespace Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement
{
diff --git a/Src/ElasticScale.Client/ShardManagement/SqlStore/SqlSchemaInfo.cs b/Src/ElasticScale.Client/ShardManagement/SqlStore/SqlSchemaInfo.cs
index f5a0b09..e2e49a8 100644
--- a/Src/ElasticScale.Client/ShardManagement/SqlStore/SqlSchemaInfo.cs
+++ b/Src/ElasticScale.Client/ShardManagement/SqlStore/SqlSchemaInfo.cs
@@ -1,13 +1,8 @@
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-using System;
-#if NETFRAMEWORK
- using System.Data.SqlClient;
-#else
- using Microsoft.Data.SqlClient;
-#endif
using System.Data.SqlTypes;
+using Microsoft.Data.SqlClient;
namespace Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement
{
diff --git a/Src/ElasticScale.Client/ShardManagement/SqlStore/SqlShard.cs b/Src/ElasticScale.Client/ShardManagement/SqlStore/SqlShard.cs
index df750d0..4b602c7 100644
--- a/Src/ElasticScale.Client/ShardManagement/SqlStore/SqlShard.cs
+++ b/Src/ElasticScale.Client/ShardManagement/SqlStore/SqlShard.cs
@@ -2,12 +2,7 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System;
-#if NETFRAMEWORK
- using System.Data.SqlClient;
-#else
- using Microsoft.Data.SqlClient;
-#endif
-using System.Data.SqlTypes;
+using Microsoft.Data.SqlClient;
namespace Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement
{
diff --git a/Src/ElasticScale.Client/ShardManagement/SqlStore/SqlShardMap.cs b/Src/ElasticScale.Client/ShardManagement/SqlStore/SqlShardMap.cs
index 5467028..f14b573 100644
--- a/Src/ElasticScale.Client/ShardManagement/SqlStore/SqlShardMap.cs
+++ b/Src/ElasticScale.Client/ShardManagement/SqlStore/SqlShardMap.cs
@@ -2,11 +2,7 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System;
-#if NETFRAMEWORK
- using System.Data.SqlClient;
-#else
- using Microsoft.Data.SqlClient;
-#endif
+using Microsoft.Data.SqlClient;
namespace Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement
{
diff --git a/Src/ElasticScale.Client/ShardManagement/SqlStore/SqlShardMapManagerCredentials.cs b/Src/ElasticScale.Client/ShardManagement/SqlStore/SqlShardMapManagerCredentials.cs
index d573fdd..a0c45f2 100644
--- a/Src/ElasticScale.Client/ShardManagement/SqlStore/SqlShardMapManagerCredentials.cs
+++ b/Src/ElasticScale.Client/ShardManagement/SqlStore/SqlShardMapManagerCredentials.cs
@@ -2,11 +2,7 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System;
-#if NETFRAMEWORK
- using System.Data.SqlClient;
-#else
- using Microsoft.Data.SqlClient;
-#endif
+using Microsoft.Data.SqlClient;
namespace Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement
{
diff --git a/Src/ElasticScale.Client/ShardManagement/SqlStore/SqlStoreConnection.cs b/Src/ElasticScale.Client/ShardManagement/SqlStore/SqlStoreConnection.cs
index 4033816..589681c 100644
--- a/Src/ElasticScale.Client/ShardManagement/SqlStore/SqlStoreConnection.cs
+++ b/Src/ElasticScale.Client/ShardManagement/SqlStore/SqlStoreConnection.cs
@@ -3,12 +3,8 @@
using System;
using System.Data;
-#if NETFRAMEWORK
- using System.Data.SqlClient;
-#else
- using Microsoft.Data.SqlClient;
-#endif
using System.Threading.Tasks;
+using Microsoft.Data.SqlClient;
namespace Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement
{
diff --git a/Src/ElasticScale.Client/ShardManagement/SqlStore/SqlStoreConnectionFactory.cs b/Src/ElasticScale.Client/ShardManagement/SqlStore/SqlStoreConnectionFactory.cs
index 77e8577..64f84bb 100644
--- a/Src/ElasticScale.Client/ShardManagement/SqlStore/SqlStoreConnectionFactory.cs
+++ b/Src/ElasticScale.Client/ShardManagement/SqlStore/SqlStoreConnectionFactory.cs
@@ -3,12 +3,6 @@
namespace Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement
{
-#if NETFRAMEWORK
- using System.Data.SqlClient;
-#else
- using Microsoft.Data.SqlClient;
-#endif
-
///
/// Constructs instance of Sql Store Connection.
///
diff --git a/Src/ElasticScale.Client/ShardManagement/SqlStore/SqlStoreTransactionScope.cs b/Src/ElasticScale.Client/ShardManagement/SqlStore/SqlStoreTransactionScope.cs
index 906d74f..973f755 100644
--- a/Src/ElasticScale.Client/ShardManagement/SqlStore/SqlStoreTransactionScope.cs
+++ b/Src/ElasticScale.Client/ShardManagement/SqlStore/SqlStoreTransactionScope.cs
@@ -4,17 +4,13 @@
using System;
using System.Collections.Generic;
using System.Data;
-#if NETFRAMEWORK
- using System.Data.SqlClient;
-#else
- using Microsoft.Data.SqlClient;
-#endif
using System.Data.SqlTypes;
using System.Diagnostics;
using System.Text;
using System.Threading.Tasks;
using System.Xml;
using System.Xml.Linq;
+using Microsoft.Data.SqlClient;
namespace Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement
{
diff --git a/Src/ElasticScale.Client/ShardManagement/SqlStore/SqlUserStoreConnection.cs b/Src/ElasticScale.Client/ShardManagement/SqlStore/SqlUserStoreConnection.cs
index bf4cbb7..ea410df 100644
--- a/Src/ElasticScale.Client/ShardManagement/SqlStore/SqlUserStoreConnection.cs
+++ b/Src/ElasticScale.Client/ShardManagement/SqlStore/SqlUserStoreConnection.cs
@@ -2,12 +2,8 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System;
-#if NETFRAMEWORK
- using System.Data.SqlClient;
-#else
- using Microsoft.Data.SqlClient;
-#endif
using System.Threading.Tasks;
+using Microsoft.Data.SqlClient;
namespace Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement
{
diff --git a/Src/ElasticScale.Client/ShardManagement/Store/IStoreConnectionFactory.cs b/Src/ElasticScale.Client/ShardManagement/Store/IStoreConnectionFactory.cs
index 51a29c8..2b03419 100644
--- a/Src/ElasticScale.Client/ShardManagement/Store/IStoreConnectionFactory.cs
+++ b/Src/ElasticScale.Client/ShardManagement/Store/IStoreConnectionFactory.cs
@@ -3,12 +3,6 @@
namespace Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement
{
-#if NETFRAMEWORK
- using System.Data.SqlClient;
-#else
- using Microsoft.Data.SqlClient;
-#endif
-
///
/// Factory for store connections.
///
diff --git a/Src/ElasticScale.Client/ShardManagement/Store/IStoreLocation.cs b/Src/ElasticScale.Client/ShardManagement/Store/IStoreLocation.cs
index 95c5fec..ceb463f 100644
--- a/Src/ElasticScale.Client/ShardManagement/Store/IStoreLocation.cs
+++ b/Src/ElasticScale.Client/ShardManagement/Store/IStoreLocation.cs
@@ -1,8 +1,6 @@
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-using System;
-
namespace Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement
{
///
diff --git a/Src/ElasticScale.Client/ShardManagement/Store/IStoreSchemaInfo.cs b/Src/ElasticScale.Client/ShardManagement/Store/IStoreSchemaInfo.cs
index c260316..06734c5 100644
--- a/Src/ElasticScale.Client/ShardManagement/Store/IStoreSchemaInfo.cs
+++ b/Src/ElasticScale.Client/ShardManagement/Store/IStoreSchemaInfo.cs
@@ -1,7 +1,6 @@
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-using System;
using System.Data.SqlTypes;
namespace Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement
diff --git a/Src/ElasticScale.Client/ShardManagement/Store/IStoreTransactionScope.cs b/Src/ElasticScale.Client/ShardManagement/Store/IStoreTransactionScope.cs
index 48df0e2..d999c21 100644
--- a/Src/ElasticScale.Client/ShardManagement/Store/IStoreTransactionScope.cs
+++ b/Src/ElasticScale.Client/ShardManagement/Store/IStoreTransactionScope.cs
@@ -3,12 +3,6 @@
using System;
using System.Collections.Generic;
-#if NETFRAMEWORK
- using System.Data.SqlClient;
-#else
- using Microsoft.Data.SqlClient;
-#endif
-using System.Data.SqlTypes;
using System.Text;
using System.Threading.Tasks;
using System.Xml.Linq;
diff --git a/Src/ElasticScale.Client/ShardManagement/Store/IUserStoreConnection.cs b/Src/ElasticScale.Client/ShardManagement/Store/IUserStoreConnection.cs
index 4562f8b..79c3717 100644
--- a/Src/ElasticScale.Client/ShardManagement/Store/IUserStoreConnection.cs
+++ b/Src/ElasticScale.Client/ShardManagement/Store/IUserStoreConnection.cs
@@ -2,12 +2,8 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System;
-#if NETFRAMEWORK
- using System.Data.SqlClient;
-#else
- using Microsoft.Data.SqlClient;
-#endif
using System.Threading.Tasks;
+using Microsoft.Data.SqlClient;
namespace Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement
{
diff --git a/Src/ElasticScale.Client/ShardManagement/Store/SqlVersion.cs b/Src/ElasticScale.Client/ShardManagement/Store/SqlVersion.cs
index 83d20f5..279f3be 100644
--- a/Src/ElasticScale.Client/ShardManagement/Store/SqlVersion.cs
+++ b/Src/ElasticScale.Client/ShardManagement/Store/SqlVersion.cs
@@ -2,12 +2,7 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System;
-#if NETFRAMEWORK
- using System.Data.SqlClient;
-#else
- using Microsoft.Data.SqlClient;
-#endif
-using System.Data.SqlTypes;
+using Microsoft.Data.SqlClient;
namespace Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement
{
diff --git a/Src/ElasticScale.Client/ShardManagement/StoreOperations/Base/IStoreOperation.cs b/Src/ElasticScale.Client/ShardManagement/StoreOperations/Base/IStoreOperation.cs
index 58adf4f..ea4e7f6 100644
--- a/Src/ElasticScale.Client/ShardManagement/StoreOperations/Base/IStoreOperation.cs
+++ b/Src/ElasticScale.Client/ShardManagement/StoreOperations/Base/IStoreOperation.cs
@@ -2,10 +2,6 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
namespace Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement
{
diff --git a/Src/ElasticScale.Client/ShardManagement/StoreOperations/Base/StoreObjectFormatterXml.cs b/Src/ElasticScale.Client/ShardManagement/StoreOperations/Base/StoreObjectFormatterXml.cs
index fbd26bb..9af1f18 100644
--- a/Src/ElasticScale.Client/ShardManagement/StoreOperations/Base/StoreObjectFormatterXml.cs
+++ b/Src/ElasticScale.Client/ShardManagement/StoreOperations/Base/StoreObjectFormatterXml.cs
@@ -2,7 +2,6 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System;
-using System.Data.SqlTypes;
using System.Diagnostics;
using System.Xml;
using System.Xml.Linq;
diff --git a/Src/ElasticScale.Client/ShardManagement/StoreOperations/Base/StoreOperation.cs b/Src/ElasticScale.Client/ShardManagement/StoreOperations/Base/StoreOperation.cs
index 88e9aac..eb7d463 100644
--- a/Src/ElasticScale.Client/ShardManagement/StoreOperations/Base/StoreOperation.cs
+++ b/Src/ElasticScale.Client/ShardManagement/StoreOperations/Base/StoreOperation.cs
@@ -2,13 +2,9 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System;
-#if NETFRAMEWORK
- using System.Data.SqlClient;
-#else
- using Microsoft.Data.SqlClient;
-#endif
using System.Diagnostics;
using System.Linq;
+using Microsoft.Data.SqlClient;
namespace Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement
{
diff --git a/Src/ElasticScale.Client/ShardManagement/StoreOperations/Base/StoreOperationLocal.cs b/Src/ElasticScale.Client/ShardManagement/StoreOperations/Base/StoreOperationLocal.cs
index dc29bb7..bf412af 100644
--- a/Src/ElasticScale.Client/ShardManagement/StoreOperations/Base/StoreOperationLocal.cs
+++ b/Src/ElasticScale.Client/ShardManagement/StoreOperations/Base/StoreOperationLocal.cs
@@ -2,11 +2,7 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System;
-#if NETFRAMEWORK
- using System.Data.SqlClient;
-#else
- using Microsoft.Data.SqlClient;
-#endif
+using Microsoft.Data.SqlClient;
namespace Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement
{
diff --git a/Src/ElasticScale.Client/ShardManagement/StoreOperations/Recovery/DetachShardGlobalOperation.cs b/Src/ElasticScale.Client/ShardManagement/StoreOperations/Recovery/DetachShardGlobalOperation.cs
index 4b3eb14..1246b83 100644
--- a/Src/ElasticScale.Client/ShardManagement/StoreOperations/Recovery/DetachShardGlobalOperation.cs
+++ b/Src/ElasticScale.Client/ShardManagement/StoreOperations/Recovery/DetachShardGlobalOperation.cs
@@ -1,12 +1,6 @@
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-#if NETFRAMEWORK
- using System.Data.SqlClient;
-#else
- using Microsoft.Data.SqlClient;
-#endif
-
namespace Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement
{
///
diff --git a/Src/ElasticScale.Client/ShardManagement/StoreOperations/Recovery/ReplaceMappingsGlobalOperation.cs b/Src/ElasticScale.Client/ShardManagement/StoreOperations/Recovery/ReplaceMappingsGlobalOperation.cs
index 9a5ad4e..29e9990 100644
--- a/Src/ElasticScale.Client/ShardManagement/StoreOperations/Recovery/ReplaceMappingsGlobalOperation.cs
+++ b/Src/ElasticScale.Client/ShardManagement/StoreOperations/Recovery/ReplaceMappingsGlobalOperation.cs
@@ -2,11 +2,6 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System.Collections.Generic;
-#if NETFRAMEWORK
- using System.Data.SqlClient;
-#else
- using Microsoft.Data.SqlClient;
-#endif
using System.Diagnostics;
using System.Linq;
diff --git a/Src/ElasticScale.Client/ShardManagement/StoreOperations/SchemaInformation/AddShardingSchemaInfoGlobalOperation.cs b/Src/ElasticScale.Client/ShardManagement/StoreOperations/SchemaInformation/AddShardingSchemaInfoGlobalOperation.cs
index 8ae03f2..3d1f256 100644
--- a/Src/ElasticScale.Client/ShardManagement/StoreOperations/SchemaInformation/AddShardingSchemaInfoGlobalOperation.cs
+++ b/Src/ElasticScale.Client/ShardManagement/StoreOperations/SchemaInformation/AddShardingSchemaInfoGlobalOperation.cs
@@ -1,12 +1,6 @@
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-#if NETFRAMEWORK
- using System.Data.SqlClient;
-#else
- using Microsoft.Data.SqlClient;
-#endif
-
namespace Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement
{
///
diff --git a/Src/ElasticScale.Client/ShardManagement/StoreOperations/SchemaInformation/FindShardingSchemaInfoGlobalOperation.cs b/Src/ElasticScale.Client/ShardManagement/StoreOperations/SchemaInformation/FindShardingSchemaInfoGlobalOperation.cs
index d414e5e..70d4e92 100644
--- a/Src/ElasticScale.Client/ShardManagement/StoreOperations/SchemaInformation/FindShardingSchemaInfoGlobalOperation.cs
+++ b/Src/ElasticScale.Client/ShardManagement/StoreOperations/SchemaInformation/FindShardingSchemaInfoGlobalOperation.cs
@@ -1,12 +1,6 @@
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-#if NETFRAMEWORK
- using System.Data.SqlClient;
-#else
- using Microsoft.Data.SqlClient;
-#endif
-
namespace Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement
{
///
diff --git a/Src/ElasticScale.Client/ShardManagement/StoreOperations/SchemaInformation/GetShardingSchemaInfosGlobalOperation.cs b/Src/ElasticScale.Client/ShardManagement/StoreOperations/SchemaInformation/GetShardingSchemaInfosGlobalOperation.cs
index 370827e..393c169 100644
--- a/Src/ElasticScale.Client/ShardManagement/StoreOperations/SchemaInformation/GetShardingSchemaInfosGlobalOperation.cs
+++ b/Src/ElasticScale.Client/ShardManagement/StoreOperations/SchemaInformation/GetShardingSchemaInfosGlobalOperation.cs
@@ -1,12 +1,6 @@
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-#if NETFRAMEWORK
- using System.Data.SqlClient;
-#else
- using Microsoft.Data.SqlClient;
-#endif
-
namespace Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement
{
///
diff --git a/Src/ElasticScale.Client/ShardManagement/StoreOperations/SchemaInformation/RemoveShardingSchemaInfoGlobalOperation.cs b/Src/ElasticScale.Client/ShardManagement/StoreOperations/SchemaInformation/RemoveShardingSchemaInfoGlobalOperation.cs
index cee3bd4..7ea1c9c 100644
--- a/Src/ElasticScale.Client/ShardManagement/StoreOperations/SchemaInformation/RemoveShardingSchemaInfoGlobalOperation.cs
+++ b/Src/ElasticScale.Client/ShardManagement/StoreOperations/SchemaInformation/RemoveShardingSchemaInfoGlobalOperation.cs
@@ -1,12 +1,6 @@
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-#if NETFRAMEWORK
- using System.Data.SqlClient;
-#else
- using Microsoft.Data.SqlClient;
-#endif
-
namespace Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement
{
///
diff --git a/Src/ElasticScale.Client/ShardManagement/StoreOperations/SchemaInformation/UpdateShardingSchemaInfoGlobalOperation.cs b/Src/ElasticScale.Client/ShardManagement/StoreOperations/SchemaInformation/UpdateShardingSchemaInfoGlobalOperation.cs
index 9c281b1..3d6fa53 100644
--- a/Src/ElasticScale.Client/ShardManagement/StoreOperations/SchemaInformation/UpdateShardingSchemaInfoGlobalOperation.cs
+++ b/Src/ElasticScale.Client/ShardManagement/StoreOperations/SchemaInformation/UpdateShardingSchemaInfoGlobalOperation.cs
@@ -1,12 +1,6 @@
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-#if NETFRAMEWORK
- using System.Data.SqlClient;
-#else
- using Microsoft.Data.SqlClient;
-#endif
-
namespace Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement
{
///
diff --git a/Src/ElasticScale.Client/ShardManagement/StoreOperations/ShardMap/AddShardOperation.cs b/Src/ElasticScale.Client/ShardManagement/StoreOperations/ShardMap/AddShardOperation.cs
index b5699dd..318e367 100644
--- a/Src/ElasticScale.Client/ShardManagement/StoreOperations/ShardMap/AddShardOperation.cs
+++ b/Src/ElasticScale.Client/ShardManagement/StoreOperations/ShardMap/AddShardOperation.cs
@@ -2,11 +2,6 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System;
-#if NETFRAMEWORK
- using System.Data.SqlClient;
-#else
- using Microsoft.Data.SqlClient;
-#endif
using System.Linq;
namespace Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement
diff --git a/Src/ElasticScale.Client/ShardManagement/StoreOperations/ShardMap/FindShardByLocationGlobalOperation.cs b/Src/ElasticScale.Client/ShardManagement/StoreOperations/ShardMap/FindShardByLocationGlobalOperation.cs
index df23d98..761d060 100644
--- a/Src/ElasticScale.Client/ShardManagement/StoreOperations/ShardMap/FindShardByLocationGlobalOperation.cs
+++ b/Src/ElasticScale.Client/ShardManagement/StoreOperations/ShardMap/FindShardByLocationGlobalOperation.cs
@@ -1,12 +1,6 @@
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-#if NETFRAMEWORK
- using System.Data.SqlClient;
-#else
- using Microsoft.Data.SqlClient;
-#endif
-
namespace Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement
{
///
diff --git a/Src/ElasticScale.Client/ShardManagement/StoreOperations/ShardMap/GetShardsGlobalOperation.cs b/Src/ElasticScale.Client/ShardManagement/StoreOperations/ShardMap/GetShardsGlobalOperation.cs
index fbd5c3e..eedaec2 100644
--- a/Src/ElasticScale.Client/ShardManagement/StoreOperations/ShardMap/GetShardsGlobalOperation.cs
+++ b/Src/ElasticScale.Client/ShardManagement/StoreOperations/ShardMap/GetShardsGlobalOperation.cs
@@ -1,12 +1,6 @@
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-#if NETFRAMEWORK
- using System.Data.SqlClient;
-#else
- using Microsoft.Data.SqlClient;
-#endif
-
namespace Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement
{
///
diff --git a/Src/ElasticScale.Client/ShardManagement/StoreOperations/ShardMap/RemoveShardOperation.cs b/Src/ElasticScale.Client/ShardManagement/StoreOperations/ShardMap/RemoveShardOperation.cs
index b7da93c..b6e8b29 100644
--- a/Src/ElasticScale.Client/ShardManagement/StoreOperations/ShardMap/RemoveShardOperation.cs
+++ b/Src/ElasticScale.Client/ShardManagement/StoreOperations/ShardMap/RemoveShardOperation.cs
@@ -2,12 +2,6 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System;
-#if NETFRAMEWORK
- using System.Data.SqlClient;
-#else
- using Microsoft.Data.SqlClient;
-#endif
-using System.Linq;
namespace Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement
{
diff --git a/Src/ElasticScale.Client/ShardManagement/StoreOperations/ShardMap/UpdateShardOperation.cs b/Src/ElasticScale.Client/ShardManagement/StoreOperations/ShardMap/UpdateShardOperation.cs
index a2024e2..5f5a114 100644
--- a/Src/ElasticScale.Client/ShardManagement/StoreOperations/ShardMap/UpdateShardOperation.cs
+++ b/Src/ElasticScale.Client/ShardManagement/StoreOperations/ShardMap/UpdateShardOperation.cs
@@ -2,12 +2,6 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System;
-#if NETFRAMEWORK
- using System.Data.SqlClient;
-#else
- using Microsoft.Data.SqlClient;
-#endif
-using System.Linq;
namespace Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement
{
diff --git a/Src/ElasticScale.Client/ShardManagement/StoreOperations/ShardMapManager/AddShardMapGlobalOperation.cs b/Src/ElasticScale.Client/ShardManagement/StoreOperations/ShardMapManager/AddShardMapGlobalOperation.cs
index de944b5..a3b0fa8 100644
--- a/Src/ElasticScale.Client/ShardManagement/StoreOperations/ShardMapManager/AddShardMapGlobalOperation.cs
+++ b/Src/ElasticScale.Client/ShardManagement/StoreOperations/ShardMapManager/AddShardMapGlobalOperation.cs
@@ -1,11 +1,6 @@
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-#if NETFRAMEWORK
- using System.Data.SqlClient;
-#else
- using Microsoft.Data.SqlClient;
-#endif
using System.Diagnostics;
namespace Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement
diff --git a/Src/ElasticScale.Client/ShardManagement/StoreOperations/ShardMapManager/FindShardMapByNameGlobalOperation.cs b/Src/ElasticScale.Client/ShardManagement/StoreOperations/ShardMapManager/FindShardMapByNameGlobalOperation.cs
index 7d24df7..6bf21f8 100644
--- a/Src/ElasticScale.Client/ShardManagement/StoreOperations/ShardMapManager/FindShardMapByNameGlobalOperation.cs
+++ b/Src/ElasticScale.Client/ShardManagement/StoreOperations/ShardMapManager/FindShardMapByNameGlobalOperation.cs
@@ -1,11 +1,6 @@
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-#if NETFRAMEWORK
- using System.Data.SqlClient;
-#else
- using Microsoft.Data.SqlClient;
-#endif
using System.Diagnostics;
namespace Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement
diff --git a/Src/ElasticScale.Client/ShardManagement/StoreOperations/ShardMapManager/GetDistinctShardLocationsGlobalOperation.cs b/Src/ElasticScale.Client/ShardManagement/StoreOperations/ShardMapManager/GetDistinctShardLocationsGlobalOperation.cs
index c5ac072..dd38aff 100644
--- a/Src/ElasticScale.Client/ShardManagement/StoreOperations/ShardMapManager/GetDistinctShardLocationsGlobalOperation.cs
+++ b/Src/ElasticScale.Client/ShardManagement/StoreOperations/ShardMapManager/GetDistinctShardLocationsGlobalOperation.cs
@@ -1,12 +1,6 @@
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-#if NETFRAMEWORK
- using System.Data.SqlClient;
-#else
- using Microsoft.Data.SqlClient;
-#endif
-
namespace Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement
{
///
diff --git a/Src/ElasticScale.Client/ShardManagement/StoreOperations/ShardMapManager/GetShardMapsGlobalOperation.cs b/Src/ElasticScale.Client/ShardManagement/StoreOperations/ShardMapManager/GetShardMapsGlobalOperation.cs
index 4fc9db7..569d0e2 100644
--- a/Src/ElasticScale.Client/ShardManagement/StoreOperations/ShardMapManager/GetShardMapsGlobalOperation.cs
+++ b/Src/ElasticScale.Client/ShardManagement/StoreOperations/ShardMapManager/GetShardMapsGlobalOperation.cs
@@ -1,11 +1,6 @@
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-#if NETFRAMEWORK
- using System.Data.SqlClient;
-#else
- using Microsoft.Data.SqlClient;
-#endif
using System.Diagnostics;
namespace Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement
diff --git a/Src/ElasticScale.Client/ShardManagement/StoreOperations/ShardMapManager/LoadShardMapManagerGlobalOperation.cs b/Src/ElasticScale.Client/ShardManagement/StoreOperations/ShardMapManager/LoadShardMapManagerGlobalOperation.cs
index 94800d6..789ee4d 100644
--- a/Src/ElasticScale.Client/ShardManagement/StoreOperations/ShardMapManager/LoadShardMapManagerGlobalOperation.cs
+++ b/Src/ElasticScale.Client/ShardManagement/StoreOperations/ShardMapManager/LoadShardMapManagerGlobalOperation.cs
@@ -2,13 +2,7 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System.Collections.Generic;
-#if NETFRAMEWORK
- using System.Data.SqlClient;
-#else
- using Microsoft.Data.SqlClient;
-#endif
using System.Diagnostics;
-using System.Linq;
namespace Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement
{
diff --git a/Src/ElasticScale.Client/ShardManagement/StoreOperations/ShardMapManager/RemoveShardMapGlobalOperation.cs b/Src/ElasticScale.Client/ShardManagement/StoreOperations/ShardMapManager/RemoveShardMapGlobalOperation.cs
index 939f3e6..dbb52c2 100644
--- a/Src/ElasticScale.Client/ShardManagement/StoreOperations/ShardMapManager/RemoveShardMapGlobalOperation.cs
+++ b/Src/ElasticScale.Client/ShardManagement/StoreOperations/ShardMapManager/RemoveShardMapGlobalOperation.cs
@@ -1,11 +1,6 @@
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-#if NETFRAMEWORK
- using System.Data.SqlClient;
-#else
- using Microsoft.Data.SqlClient;
-#endif
using System.Diagnostics;
namespace Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement
diff --git a/Src/ElasticScale.Client/ShardManagement/StoreOperations/ShardMapManagerFactory/CreateShardMapManagerGlobalOperation.cs b/Src/ElasticScale.Client/ShardManagement/StoreOperations/ShardMapManagerFactory/CreateShardMapManagerGlobalOperation.cs
index 76e6346..70ce0a7 100644
--- a/Src/ElasticScale.Client/ShardManagement/StoreOperations/ShardMapManagerFactory/CreateShardMapManagerGlobalOperation.cs
+++ b/Src/ElasticScale.Client/ShardManagement/StoreOperations/ShardMapManagerFactory/CreateShardMapManagerGlobalOperation.cs
@@ -2,13 +2,8 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System;
-#if NETFRAMEWORK
- using System.Data.SqlClient;
-#else
- using Microsoft.Data.SqlClient;
-#endif
-using System.Linq;
using System.Diagnostics;
+using System.Linq;
namespace Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement
{
diff --git a/Src/ElasticScale.Client/ShardManagement/StoreOperations/ShardMapper/AddMappingOperation.cs b/Src/ElasticScale.Client/ShardManagement/StoreOperations/ShardMapper/AddMappingOperation.cs
index dca4bbe..5575e20 100644
--- a/Src/ElasticScale.Client/ShardManagement/StoreOperations/ShardMapper/AddMappingOperation.cs
+++ b/Src/ElasticScale.Client/ShardManagement/StoreOperations/ShardMapper/AddMappingOperation.cs
@@ -2,12 +2,6 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System;
-#if NETFRAMEWORK
- using System.Data.SqlClient;
-#else
- using Microsoft.Data.SqlClient;
-#endif
-using System.Linq;
namespace Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement
{
diff --git a/Src/ElasticScale.Client/ShardManagement/StoreOperations/ShardMapper/FindMappingByIdGlobalOperation.cs b/Src/ElasticScale.Client/ShardManagement/StoreOperations/ShardMapper/FindMappingByIdGlobalOperation.cs
index 4e7723c..3433eb0 100644
--- a/Src/ElasticScale.Client/ShardManagement/StoreOperations/ShardMapper/FindMappingByIdGlobalOperation.cs
+++ b/Src/ElasticScale.Client/ShardManagement/StoreOperations/ShardMapper/FindMappingByIdGlobalOperation.cs
@@ -1,12 +1,6 @@
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-using System;
-#if NETFRAMEWORK
- using System.Data.SqlClient;
-#else
- using Microsoft.Data.SqlClient;
-#endif
using System.Diagnostics;
namespace Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement
diff --git a/Src/ElasticScale.Client/ShardManagement/StoreOperations/ShardMapper/FindMappingByKeyGlobalOperation.cs b/Src/ElasticScale.Client/ShardManagement/StoreOperations/ShardMapper/FindMappingByKeyGlobalOperation.cs
index 8d6f6ed..a92ba90 100644
--- a/Src/ElasticScale.Client/ShardManagement/StoreOperations/ShardMapper/FindMappingByKeyGlobalOperation.cs
+++ b/Src/ElasticScale.Client/ShardManagement/StoreOperations/ShardMapper/FindMappingByKeyGlobalOperation.cs
@@ -1,11 +1,6 @@
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-#if NETFRAMEWORK
- using System.Data.SqlClient;
-#else
- using Microsoft.Data.SqlClient;
-#endif
using System.Diagnostics;
using System.Threading.Tasks;
diff --git a/Src/ElasticScale.Client/ShardManagement/StoreOperations/ShardMapper/GetMappingsByRangeGlobalOperation.cs b/Src/ElasticScale.Client/ShardManagement/StoreOperations/ShardMapper/GetMappingsByRangeGlobalOperation.cs
index 30f7dce..1c42456 100644
--- a/Src/ElasticScale.Client/ShardManagement/StoreOperations/ShardMapper/GetMappingsByRangeGlobalOperation.cs
+++ b/Src/ElasticScale.Client/ShardManagement/StoreOperations/ShardMapper/GetMappingsByRangeGlobalOperation.cs
@@ -1,12 +1,6 @@
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-#if NETFRAMEWORK
- using System.Data.SqlClient;
-#else
- using Microsoft.Data.SqlClient;
-#endif
-
namespace Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement
{
///
diff --git a/Src/ElasticScale.Client/ShardManagement/StoreOperations/ShardMapper/LockOrUnLockMappingsGlobalOperation.cs b/Src/ElasticScale.Client/ShardManagement/StoreOperations/ShardMapper/LockOrUnLockMappingsGlobalOperation.cs
index ff30aa6..421e2e5 100644
--- a/Src/ElasticScale.Client/ShardManagement/StoreOperations/ShardMapper/LockOrUnLockMappingsGlobalOperation.cs
+++ b/Src/ElasticScale.Client/ShardManagement/StoreOperations/ShardMapper/LockOrUnLockMappingsGlobalOperation.cs
@@ -2,13 +2,7 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System;
-#if NETFRAMEWORK
- using System.Data.SqlClient;
-#else
- using Microsoft.Data.SqlClient;
-#endif
using System.Diagnostics;
-using System.Linq;
namespace Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement
{
diff --git a/Src/ElasticScale.Client/ShardManagement/StoreOperations/ShardMapper/RemoveMappingOperation.cs b/Src/ElasticScale.Client/ShardManagement/StoreOperations/ShardMapper/RemoveMappingOperation.cs
index c1ec2b3..b1a64d1 100644
--- a/Src/ElasticScale.Client/ShardManagement/StoreOperations/ShardMapper/RemoveMappingOperation.cs
+++ b/Src/ElasticScale.Client/ShardManagement/StoreOperations/ShardMapper/RemoveMappingOperation.cs
@@ -2,12 +2,6 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System;
-#if NETFRAMEWORK
- using System.Data.SqlClient;
-#else
- using Microsoft.Data.SqlClient;
-#endif
-using System.Linq;
namespace Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement
{
diff --git a/Src/ElasticScale.Client/ShardManagement/StoreOperations/ShardMapper/ReplaceMappingsOperation.cs b/Src/ElasticScale.Client/ShardManagement/StoreOperations/ShardMapper/ReplaceMappingsOperation.cs
index 4e41854..0686fb7 100644
--- a/Src/ElasticScale.Client/ShardManagement/StoreOperations/ShardMapper/ReplaceMappingsOperation.cs
+++ b/Src/ElasticScale.Client/ShardManagement/StoreOperations/ShardMapper/ReplaceMappingsOperation.cs
@@ -2,11 +2,6 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System;
-#if NETFRAMEWORK
- using System.Data.SqlClient;
-#else
- using Microsoft.Data.SqlClient;
-#endif
using System.Diagnostics;
using System.Linq;
diff --git a/Src/ElasticScale.Client/ShardManagement/StoreOperations/ShardMapper/UpdateMappingOperation.cs b/Src/ElasticScale.Client/ShardManagement/StoreOperations/ShardMapper/UpdateMappingOperation.cs
index c13f5fd..fd3e1a1 100644
--- a/Src/ElasticScale.Client/ShardManagement/StoreOperations/ShardMapper/UpdateMappingOperation.cs
+++ b/Src/ElasticScale.Client/ShardManagement/StoreOperations/ShardMapper/UpdateMappingOperation.cs
@@ -2,11 +2,6 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System;
-#if NETFRAMEWORK
- using System.Data.SqlClient;
-#else
- using Microsoft.Data.SqlClient;
-#endif
using System.Diagnostics;
namespace Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement
diff --git a/Src/ElasticScale.Client/ShardManagement/StoreOperations/Upgrade/UpgradeStoreGlobalOperation.cs b/Src/ElasticScale.Client/ShardManagement/StoreOperations/Upgrade/UpgradeStoreGlobalOperation.cs
index 13dcf53..b62b37c 100644
--- a/Src/ElasticScale.Client/ShardManagement/StoreOperations/Upgrade/UpgradeStoreGlobalOperation.cs
+++ b/Src/ElasticScale.Client/ShardManagement/StoreOperations/Upgrade/UpgradeStoreGlobalOperation.cs
@@ -1,14 +1,9 @@
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-using System.Linq;
-#if NETFRAMEWORK
- using System.Data.SqlClient;
-#else
- using Microsoft.Data.SqlClient;
-#endif
-using System.Diagnostics;
using System;
+using System.Diagnostics;
+using System.Linq;
namespace Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement
{
diff --git a/Src/ElasticScale.Client/ShardManagement/Utils/ExceptionUtils.cs b/Src/ElasticScale.Client/ShardManagement/Utils/ExceptionUtils.cs
index c271815..bbfb82d 100644
--- a/Src/ElasticScale.Client/ShardManagement/Utils/ExceptionUtils.cs
+++ b/Src/ElasticScale.Client/ShardManagement/Utils/ExceptionUtils.cs
@@ -2,7 +2,6 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System;
-using System.Collections.Generic;
namespace Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement
{
diff --git a/Src/ElasticScale.Client/ShardManagement/Utils/ReflectionUtils.cs b/Src/ElasticScale.Client/ShardManagement/Utils/ReflectionUtils.cs
index b593d5e..916da2e 100644
--- a/Src/ElasticScale.Client/ShardManagement/Utils/ReflectionUtils.cs
+++ b/Src/ElasticScale.Client/ShardManagement/Utils/ReflectionUtils.cs
@@ -10,11 +10,7 @@ internal static class ReflectionUtils
{
public static Assembly GetAssembly(this Type type)
{
-#if NETFRAMEWORK
- return type.Assembly;
-#else
return type.GetTypeInfo().Assembly;
-#endif
}
}
}
diff --git a/Src/ElasticScale.Client/ShardManagement/Utils/SqlUtils.cs b/Src/ElasticScale.Client/ShardManagement/Utils/SqlUtils.cs
index cc9d9a9..561edf9 100644
--- a/Src/ElasticScale.Client/ShardManagement/Utils/SqlUtils.cs
+++ b/Src/ElasticScale.Client/ShardManagement/Utils/SqlUtils.cs
@@ -2,24 +2,16 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System;
-using System.Collections;
using System.Collections.Generic;
using System.Data;
-#if NETFRAMEWORK
- using System.Data.SqlClient;
-#else
- using Microsoft.Data.SqlClient;
-#endif
using System.Data.SqlTypes;
using System.Diagnostics;
using System.IO;
-using System.Linq;
-using System.Reflection;
-using System.Resources;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading;
using System.Threading.Tasks;
+using Microsoft.Data.SqlClient;
namespace Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement
{
diff --git a/Test/ElasticScale.ClientTestCommon/AssertExtensions.cs b/Test/ElasticScale.ClientTestCommon/AssertExtensions.cs
index a743a0b..9cd3e05 100644
--- a/Test/ElasticScale.ClientTestCommon/AssertExtensions.cs
+++ b/Test/ElasticScale.ClientTestCommon/AssertExtensions.cs
@@ -1,7 +1,6 @@
using System;
using System.Collections;
using System.Collections.Generic;
-using System.Diagnostics;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
diff --git a/Test/ElasticScale.ClientTestCommon/Microsoft.Azure.SqlDatabase.ElasticScale.ClientTestCommon.csproj b/Test/ElasticScale.ClientTestCommon/Microsoft.Azure.SqlDatabase.ElasticScale.ClientTestCommon.csproj
index e5704d4..bd9e111 100644
--- a/Test/ElasticScale.ClientTestCommon/Microsoft.Azure.SqlDatabase.ElasticScale.ClientTestCommon.csproj
+++ b/Test/ElasticScale.ClientTestCommon/Microsoft.Azure.SqlDatabase.ElasticScale.ClientTestCommon.csproj
@@ -1,13 +1,12 @@
-
+
- netstandard2.0
+ net5.0
+ $(NoWarn);SYSLIB0011;
-
-
-
-
+
+
\ No newline at end of file
diff --git a/Test/ElasticScale.ClientTestCommon/Properties/AssemblyInfo.cs b/Test/ElasticScale.ClientTestCommon/Properties/AssemblyInfo.cs
index b389366..e16340e 100644
--- a/Test/ElasticScale.ClientTestCommon/Properties/AssemblyInfo.cs
+++ b/Test/ElasticScale.ClientTestCommon/Properties/AssemblyInfo.cs
@@ -1,7 +1,5 @@
using System;
-using System.Reflection;
using System.Resources;
-using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// Setting ComVisible to false makes the types in this assembly not visible
diff --git a/Test/ElasticScale.ClientTestCommon/SqlAuthenticationLogin.cs b/Test/ElasticScale.ClientTestCommon/SqlAuthenticationLogin.cs
index c4f67ef..693124a 100644
--- a/Test/ElasticScale.ClientTestCommon/SqlAuthenticationLogin.cs
+++ b/Test/ElasticScale.ClientTestCommon/SqlAuthenticationLogin.cs
@@ -4,8 +4,8 @@
namespace Microsoft.Azure.SqlDatabase.ElasticScale.ClientTestCommon
{
using System;
- using Microsoft.Data.SqlClient;
using System.Diagnostics;
+ using Microsoft.Data.SqlClient;
///
/// Manage SQL Authentication login for testing.
diff --git a/Test/ElasticScale.Query.UnitTests/Microsoft.Azure.SqlDatabase.ElasticScale.Query.UnitTests.csproj b/Test/ElasticScale.Query.UnitTests/Microsoft.Azure.SqlDatabase.ElasticScale.Query.UnitTests.csproj
index 3beb214..be629b8 100644
--- a/Test/ElasticScale.Query.UnitTests/Microsoft.Azure.SqlDatabase.ElasticScale.Query.UnitTests.csproj
+++ b/Test/ElasticScale.Query.UnitTests/Microsoft.Azure.SqlDatabase.ElasticScale.Query.UnitTests.csproj
@@ -1,15 +1,16 @@
-
+
- netcoreapp3.1
+ net5.0
false
+ $(NoWarn);CS8073;
-
-
-
-
+
+
+
+
diff --git a/Test/ElasticScale.Query.UnitTests/MockSqlCommand.cs b/Test/ElasticScale.Query.UnitTests/MockSqlCommand.cs
index 09cb35a..1992eee 100644
--- a/Test/ElasticScale.Query.UnitTests/MockSqlCommand.cs
+++ b/Test/ElasticScale.Query.UnitTests/MockSqlCommand.cs
@@ -7,9 +7,9 @@
using System;
using System.Data;
using System.Data.Common;
-using Microsoft.Data.SqlClient;
using System.Threading;
using System.Threading.Tasks;
+using Microsoft.Data.SqlClient;
namespace Microsoft.Azure.SqlDatabase.ElasticScale.Query.UnitTests
{
diff --git a/Test/ElasticScale.Query.UnitTests/MockSqlDataReader.cs b/Test/ElasticScale.Query.UnitTests/MockSqlDataReader.cs
index 8a4eaab..b41b74c 100644
--- a/Test/ElasticScale.Query.UnitTests/MockSqlDataReader.cs
+++ b/Test/ElasticScale.Query.UnitTests/MockSqlDataReader.cs
@@ -10,9 +10,6 @@
using System.Data;
using System.Data.Common;
using System.IO;
-#if NETFRAMEWORK
-using System.Runtime.Remoting;
-#endif
using System.Threading;
using System.Threading.Tasks;
@@ -156,16 +153,6 @@ public void Open()
_isClosed = false;
}
-#if NETFRAMEWORK
- ///
- /// Not implemented
- ///
- public override ObjRef CreateObjRef(Type requestedType)
- {
- throw new NotImplementedException();
- }
-#endif
-
///
/// Gets the value of the specified column as a Boolean.
///
@@ -475,14 +462,6 @@ public override int GetValues(object[] values)
throw new NotImplementedException();
}
- ///
- /// Not implemented
- ///
- public override object InitializeLifetimeService()
- {
- throw new NotImplementedException();
- }
-
///
/// Gets a value that indicates whether the column contains nonexistent or missing values.
///
diff --git a/Test/ElasticScale.Query.UnitTests/MultiShardDataReaderTests.cs b/Test/ElasticScale.Query.UnitTests/MultiShardDataReaderTests.cs
index f24e6c5..dbb4307 100644
--- a/Test/ElasticScale.Query.UnitTests/MultiShardDataReaderTests.cs
+++ b/Test/ElasticScale.Query.UnitTests/MultiShardDataReaderTests.cs
@@ -19,22 +19,19 @@
// and grant it "control server" permissions. Will likely need to revisit this
// at some point in the future.
-using Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement;
-using Microsoft.Azure.SqlDatabase.ElasticScale.Test.Common;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
-using System.Linq;
using System.Collections.Generic;
using System.Data;
using System.Data.Common;
-using Microsoft.Data.SqlClient;
using System.Diagnostics;
-#if NETFRAMEWORK
-using System.Runtime.Remoting;
-#endif
using System.IO;
-using System.Threading.Tasks;
+using System.Linq;
using System.Threading;
+using System.Threading.Tasks;
+using Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement;
+using Microsoft.Azure.SqlDatabase.ElasticScale.Test.Common;
+using Microsoft.Data.SqlClient;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace Microsoft.Azure.SqlDatabase.ElasticScale.Query.UnitTests
{
@@ -1037,29 +1034,6 @@ public void TestAddDataReadersConcurrently()
}
}
-#if NETFRAMEWORK
- ///
- /// Check that we throw as expected when trying to call CreateObjRef.
- ///
- [TestMethod]
- [ExpectedException(typeof(RemotingException))]
- [TestCategory("ExcludeFromGatedCheckin")]
- public void TestCreateObjRefFails()
- {
- // What we're doing:
- // Set up a new sharded reader
- // Try to call CreateObjRef on it.
- // Verify that we threw as expected.
- //
- string selectSql = "SELECT dbNameField, Test_int_Field, Test_bigint_Field FROM ConsistentShardedTable";
-
- using (MultiShardDataReader sdr = GetShardedDbReader(_shardConnection, selectSql))
- {
- sdr.CreateObjRef(typeof(MultiShardDataReader));
- }
- }
-#endif
-
///
/// Check that we can iterate through the result sets as expected comparing all the values
/// returned from the getters plus some of the properties.
diff --git a/Test/ElasticScale.Query.UnitTests/MultiShardQueryE2ETests.cs b/Test/ElasticScale.Query.UnitTests/MultiShardQueryE2ETests.cs
index fea14a0..ac1bd35 100644
--- a/Test/ElasticScale.Query.UnitTests/MultiShardQueryE2ETests.cs
+++ b/Test/ElasticScale.Query.UnitTests/MultiShardQueryE2ETests.cs
@@ -9,20 +9,20 @@
// * Everything will be automated once we integrate with the larger framework.
// * Currently the tests use the same methods to create shards as MultiShardDataReaderTests
-using System.Diagnostics;
-using Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement;
-using Microsoft.Azure.SqlDatabase.ElasticScale.Test.Common;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.Common;
-using Microsoft.Data.SqlClient;
+using System.Diagnostics;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
+using Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement;
+using Microsoft.Azure.SqlDatabase.ElasticScale.Test.Common;
+using Microsoft.Data.SqlClient;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace Microsoft.Azure.SqlDatabase.ElasticScale.Query.UnitTests
{
diff --git a/Test/ElasticScale.Query.UnitTests/MultiShardTestCaseColumn.cs b/Test/ElasticScale.Query.UnitTests/MultiShardTestCaseColumn.cs
index 6048cc8..e2883e9 100644
--- a/Test/ElasticScale.Query.UnitTests/MultiShardTestCaseColumn.cs
+++ b/Test/ElasticScale.Query.UnitTests/MultiShardTestCaseColumn.cs
@@ -11,11 +11,9 @@
// Conversions from:
// http://msdn.microsoft.com/en-us/library/vstudio/cc716729(v=vs.110).aspx
-using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Data;
-using System.Xml;
namespace Microsoft.Azure.SqlDatabase.ElasticScale.Query.UnitTests
{
diff --git a/Test/ElasticScale.Query.UnitTests/MultiShardTestUtils.cs b/Test/ElasticScale.Query.UnitTests/MultiShardTestUtils.cs
index cc71734..e012536 100644
--- a/Test/ElasticScale.Query.UnitTests/MultiShardTestUtils.cs
+++ b/Test/ElasticScale.Query.UnitTests/MultiShardTestUtils.cs
@@ -4,11 +4,10 @@
using System;
using System.Collections.Generic;
using System.Data;
-using Microsoft.Data.SqlClient;
using System.Data.SqlTypes;
-using System.Security;
using System.Text;
using Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement;
+using Microsoft.Data.SqlClient;
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace Microsoft.Azure.SqlDatabase.ElasticScale.Query.UnitTests
diff --git a/Test/ElasticScale.Query.UnitTests/Properties/AssemblyInfo.cs b/Test/ElasticScale.Query.UnitTests/Properties/AssemblyInfo.cs
index 5048da1..e3a361c 100644
--- a/Test/ElasticScale.Query.UnitTests/Properties/AssemblyInfo.cs
+++ b/Test/ElasticScale.Query.UnitTests/Properties/AssemblyInfo.cs
@@ -1,8 +1,6 @@
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-using System.Reflection;
-using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// Setting ComVisible to false makes the types in this assembly not visible
diff --git a/Test/ElasticScale.Query.UnitTests/ProxyServer.cs b/Test/ElasticScale.Query.UnitTests/ProxyServer.cs
index 3382d6b..e0ea305 100644
--- a/Test/ElasticScale.Query.UnitTests/ProxyServer.cs
+++ b/Test/ElasticScale.Query.UnitTests/ProxyServer.cs
@@ -514,7 +514,7 @@ public void Kill(bool softKill)
IncomingConnection.Client.Close();
Server.Log("Successfully closed incoming connection.");
- OutgoingConnection.Client.Close();
+ OutgoingConnection.Client?.Close();
Server.Log("Successfully closed outgoing connection.");
}
}
diff --git a/Test/ElasticScale.Query.UnitTests/app.config b/Test/ElasticScale.Query.UnitTests/app.config
deleted file mode 100644
index 667776c..0000000
--- a/Test/ElasticScale.Query.UnitTests/app.config
+++ /dev/null
@@ -1,36 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Test/ElasticScale.Query.UnitTests/packages.config b/Test/ElasticScale.Query.UnitTests/packages.config
deleted file mode 100644
index 6b8deb9..0000000
--- a/Test/ElasticScale.Query.UnitTests/packages.config
+++ /dev/null
@@ -1,3 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/Test/ElasticScale.ShardManagement.UnitTests/App.config b/Test/ElasticScale.ShardManagement.UnitTests/App.config
deleted file mode 100644
index a85cef3..0000000
--- a/Test/ElasticScale.ShardManagement.UnitTests/App.config
+++ /dev/null
@@ -1,36 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Test/ElasticScale.ShardManagement.UnitTests/DateTimeShardMapperTests.cs b/Test/ElasticScale.ShardManagement.UnitTests/DateTimeShardMapperTests.cs
index cc5f2c7..eb30af8 100644
--- a/Test/ElasticScale.ShardManagement.UnitTests/DateTimeShardMapperTests.cs
+++ b/Test/ElasticScale.ShardManagement.UnitTests/DateTimeShardMapperTests.cs
@@ -1,14 +1,11 @@
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using System.Collections.Generic;
-using System.Data;
-using Microsoft.Data.SqlClient;
-using System.Linq;
using System.Text;
-using System.Threading.Tasks;
+using Microsoft.Data.SqlClient;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement.UnitTests
{
diff --git a/Test/ElasticScale.ShardManagement.UnitTests/Globals.cs b/Test/ElasticScale.ShardManagement.UnitTests/Globals.cs
index a4d13e6..c706ca2 100644
--- a/Test/ElasticScale.ShardManagement.UnitTests/Globals.cs
+++ b/Test/ElasticScale.ShardManagement.UnitTests/Globals.cs
@@ -1,8 +1,8 @@
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-using Microsoft.Data.SqlClient;
using System.Security;
+using Microsoft.Data.SqlClient;
namespace Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement.UnitTests
{
diff --git a/Test/ElasticScale.ShardManagement.UnitTests/Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement.UnitTests.csproj b/Test/ElasticScale.ShardManagement.UnitTests/Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement.UnitTests.csproj
index cef10da..2f8750f 100644
--- a/Test/ElasticScale.ShardManagement.UnitTests/Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement.UnitTests.csproj
+++ b/Test/ElasticScale.ShardManagement.UnitTests/Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement.UnitTests.csproj
@@ -1,6 +1,6 @@
-
+
- netcoreapp3.1
+ net5.0
false
0649;$(NoWarn)
@@ -8,9 +8,9 @@
-
-
-
+
+
+
diff --git a/Test/ElasticScale.ShardManagement.UnitTests/Properties/AssemblyInfo.cs b/Test/ElasticScale.ShardManagement.UnitTests/Properties/AssemblyInfo.cs
index 50841aa..5a7503e 100644
--- a/Test/ElasticScale.ShardManagement.UnitTests/Properties/AssemblyInfo.cs
+++ b/Test/ElasticScale.ShardManagement.UnitTests/Properties/AssemblyInfo.cs
@@ -1,8 +1,6 @@
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-using System.Reflection;
-using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// Setting ComVisible to false makes the types in this assembly not visible
diff --git a/Test/ElasticScale.ShardManagement.UnitTests/RecoveryManagerTests.cs b/Test/ElasticScale.ShardManagement.UnitTests/RecoveryManagerTests.cs
index a4790f2..8e66f6a 100644
--- a/Test/ElasticScale.ShardManagement.UnitTests/RecoveryManagerTests.cs
+++ b/Test/ElasticScale.ShardManagement.UnitTests/RecoveryManagerTests.cs
@@ -3,9 +3,9 @@
using System;
using System.Collections.Generic;
-using Microsoft.Data.SqlClient;
using System.Linq;
using Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement.Recovery;
+using Microsoft.Data.SqlClient;
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement.UnitTests
diff --git a/Test/ElasticScale.ShardManagement.UnitTests/ScenarioTests.cs b/Test/ElasticScale.ShardManagement.UnitTests/ScenarioTests.cs
index c57063b..26a1067 100644
--- a/Test/ElasticScale.ShardManagement.UnitTests/ScenarioTests.cs
+++ b/Test/ElasticScale.ShardManagement.UnitTests/ScenarioTests.cs
@@ -1,13 +1,12 @@
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-using Microsoft.Azure.SqlDatabase.ElasticScale.Test.Common;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using System.Collections.Generic;
-using Microsoft.Data.SqlClient;
using System.Diagnostics;
using System.Linq;
+using Microsoft.Data.SqlClient;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement.UnitTests
{
@@ -1471,153 +1470,8 @@ public void BasicScenarioRangeShardMaps()
[TestCategory("ExcludeFromGatedCheckin")]
public void ListShardMapPerformanceCounterValidation()
{
-#if NETFRAMEWORK
- if (PerfCounterInstance.HasCreatePerformanceCategoryPermissions())
- {
- string shardMapName = "PerTenantShardMap";
-
- #region Setup
-
- // Deploy shard map manager.
- ShardMapManager shardMapManager = ShardMapManagerFactory.CreateSqlShardMapManager(
- Globals.ShardMapManagerConnectionString,
- ShardMapManagerCreateMode.ReplaceExisting);
-
- // Create a single user per-tenant shard map.
- ListShardMap perTenantShardMap = shardMapManager.CreateListShardMap(shardMapName);
-
- ShardLocation sl1 = new ShardLocation(
- Globals.ShardMapManagerTestsDatasourceName,
- ScenarioTests.s_perTenantDBs[0]);
-
- // Create first shard and add 1 point mapping.
- Shard s = perTenantShardMap.CreateShard(sl1);
-
- // Create the mapping.
- PointMapping p1 = perTenantShardMap.CreatePointMapping(1, s);
-
- #endregion Setup
-
- // Delete and recreate perf counter catagory.
- ShardMapManagerFactory.CreatePerformanceCategoryAndCounters();
-
- // Eager loading of shard map manager
- ShardMapManager smm =
- ShardMapManagerFactory.GetSqlShardMapManager(Globals.ShardMapManagerConnectionString,
- ShardMapManagerLoadPolicy.Eager);
-
- // check if perf counter instance exists, instance name logic is from PerfCounterInstance.cs
- string instanceName = string.Concat(Process.GetCurrentProcess().Id.ToString(), "-", shardMapName);
-
- Assert.IsTrue(ValidateInstanceExists(instanceName));
-
- // verify # of mappings.
- Assert.IsTrue(ValidateCounterValue(instanceName, PerformanceCounterName.MappingsCount, 1));
-
- ListShardMap lsm = smm.GetListShardMap(shardMapName);
-
- // Add a new shard and mapping and verify updated counters
- ShardLocation sl2 = new ShardLocation(
- Globals.ShardMapManagerTestsDatasourceName,
- ScenarioTests.s_perTenantDBs[1]);
-
- Shard s2 = lsm.CreateShard(sl2);
-
- PointMapping p2 = lsm.CreatePointMapping(2, s2);
- Assert.IsTrue(ValidateCounterValue(instanceName, PerformanceCounterName.MappingsCount, 2));
-
- // Create few more mappings and validate MappingsAddOrUpdatePerSec counter
- s2 = lsm.GetShard(sl2);
- for (int i = 3; i < 11; i++)
- {
- lsm.CreatePointMapping(i, s2);
- s2 = lsm.GetShard(sl2);
- }
-
- Assert.IsTrue(ValidateNonZeroCounterValue(instanceName,
- PerformanceCounterName.MappingsAddOrUpdatePerSec));
-
- // try to lookup non-existing mapping and verify MappingsLookupFailedPerSec
- for (int i = 0; i < 10; i++)
- {
- ShardManagementException exception = AssertExtensions.AssertThrows(
- () => lsm.OpenConnectionForKey(20, Globals.ShardUserConnectionString));
- }
-
- Assert.IsTrue(ValidateNonZeroCounterValue(instanceName,
- PerformanceCounterName.MappingsLookupFailedPerSec));
-
- // perform DDR operation few times and validate non-zero counter values
- for (int i = 0; i < 10; i++)
- {
- using (SqlConnection conn = lsm.OpenConnectionForKey(1, Globals.ShardUserConnectionString))
- {
- }
- }
-
- Assert.IsTrue(ValidateNonZeroCounterValue(instanceName, PerformanceCounterName.DdrOperationsPerSec));
- Assert.IsTrue(ValidateNonZeroCounterValue(instanceName,
- PerformanceCounterName.MappingsLookupSucceededPerSec));
-
- // Remove shard map after removing mappings and shard
- for (int i = 1; i < 11; i++)
- {
- lsm.DeleteMapping(lsm.MarkMappingOffline(lsm.GetMappingForKey(i)));
- }
-
- Assert.IsTrue(ValidateNonZeroCounterValue(instanceName,
- PerformanceCounterName.MappingsRemovePerSec));
-
- lsm.DeleteShard(lsm.GetShard(sl1));
- lsm.DeleteShard(lsm.GetShard(sl2));
-
- Assert.IsTrue(ValidateCounterValue(instanceName, PerformanceCounterName.MappingsCount, 0));
-
- smm.DeleteShardMap(lsm);
-
- // make sure that perf counter instance is removed
- Assert.IsFalse(ValidateInstanceExists(instanceName));
- }
- else
- {
- Assert.Inconclusive("Do not have permissions to create performance counter category, test skipped");
- }
-#endif
}
-#if NETFRAMEWORK
- private bool ValidateNonZeroCounterValue(string instanceName, PerformanceCounterName counterName)
- {
- string counterdisplayName = (from c in PerfCounterInstance.counterList
- where c.CounterName == counterName
- select c.CounterDisplayName).First();
-
- using (PerformanceCounter pc =
- new PerformanceCounter(PerformanceCounters.ShardManagementPerformanceCounterCategory, counterdisplayName, instanceName))
- {
- return pc.RawValue != 0;
- }
- }
-
- private bool ValidateCounterValue(string instanceName, PerformanceCounterName counterName, long value)
- {
- string counterdisplayName = (from c in PerfCounterInstance.counterList
- where c.CounterName == counterName
- select c.CounterDisplayName).First();
-
- using (PerformanceCounter pc =
- new PerformanceCounter(PerformanceCounters.ShardManagementPerformanceCounterCategory, counterdisplayName, instanceName))
- {
- return pc.RawValue.Equals(value);
- }
- }
-
- private bool ValidateInstanceExists(string instanceName)
- {
- return PerformanceCounterCategory.InstanceExists(instanceName, PerformanceCounters.ShardManagementPerformanceCounterCategory);
- }
-#endif
-
private RangeMapping MarkMappingOfflineAndUpdateShard(RangeShardMap map, RangeMapping mapping, Shard newShard)
{
RangeMapping mappingOffline = map.UpdateMapping(
diff --git a/Test/ElasticScale.ShardManagement.UnitTests/SchemaInfoCollectionTests.cs b/Test/ElasticScale.ShardManagement.UnitTests/SchemaInfoCollectionTests.cs
index c92ef2f..898dd08 100644
--- a/Test/ElasticScale.ShardManagement.UnitTests/SchemaInfoCollectionTests.cs
+++ b/Test/ElasticScale.ShardManagement.UnitTests/SchemaInfoCollectionTests.cs
@@ -3,14 +3,14 @@
using System;
using System.Collections.Generic;
-using Microsoft.Data.SqlClient;
using System.IO;
using System.Linq;
using System.Runtime.Serialization;
using System.Xml;
using Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement.Schema;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
using Microsoft.Azure.SqlDatabase.ElasticScale.Test.Common;
+using Microsoft.Data.SqlClient;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement.UnitTests
{
diff --git a/Test/ElasticScale.ShardManagement.UnitTests/ShardKeyTests.cs b/Test/ElasticScale.ShardManagement.UnitTests/ShardKeyTests.cs
index ede9414..69724fe 100644
--- a/Test/ElasticScale.ShardManagement.UnitTests/ShardKeyTests.cs
+++ b/Test/ElasticScale.ShardManagement.UnitTests/ShardKeyTests.cs
@@ -1,11 +1,11 @@
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-using Microsoft.Azure.SqlDatabase.ElasticScale.Test.Common;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using System.Collections.Generic;
using System.Linq;
+using Microsoft.Azure.SqlDatabase.ElasticScale.Test.Common;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement.UnitTests
{
diff --git a/Test/ElasticScale.ShardManagement.UnitTests/ShardMapFaultHandlingTests.cs b/Test/ElasticScale.ShardManagement.UnitTests/ShardMapFaultHandlingTests.cs
index bb44605..cc8af42 100644
--- a/Test/ElasticScale.ShardManagement.UnitTests/ShardMapFaultHandlingTests.cs
+++ b/Test/ElasticScale.ShardManagement.UnitTests/ShardMapFaultHandlingTests.cs
@@ -3,10 +3,10 @@
using System;
using System.Collections.Generic;
-using Microsoft.Data.SqlClient;
using System.Linq;
using System.Reflection;
using Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement.UnitTests.Stubs;
+using Microsoft.Data.SqlClient;
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement.UnitTests
@@ -1484,13 +1484,8 @@ private static SqlException CreateSqlException()
ConstructorInfo[] cisSqlError = typeof(SqlError)
.GetConstructors(BindingFlags.Instance | BindingFlags.NonPublic);
-#if NETFRAMEWORK
- ConstructorInfo ciSqlError = cisSqlError.Single(c => c.GetParameters().Length == 7);
- SqlError se = (SqlError)ciSqlError.Invoke(new object[] { (int)10928, (byte)0, (byte)0, "", "", "", (int)0 });
-#else
ConstructorInfo ciSqlError = cisSqlError.Single(c => c.GetParameters().Length == 8);
SqlError se = (SqlError)ciSqlError.Invoke(new object[] { (int)10928, (byte)0, (byte)0, "", "", "", (int)0, null });
-#endif
ConstructorInfo ciSqlErrorCollection = typeof(SqlErrorCollection)
.GetConstructors(BindingFlags.Instance | BindingFlags.NonPublic).Single();
diff --git a/Test/ElasticScale.ShardManagement.UnitTests/ShardMapManagerConcurrencyTests.cs b/Test/ElasticScale.ShardManagement.UnitTests/ShardMapManagerConcurrencyTests.cs
index ec3afd1..2dad206 100644
--- a/Test/ElasticScale.ShardManagement.UnitTests/ShardMapManagerConcurrencyTests.cs
+++ b/Test/ElasticScale.ShardManagement.UnitTests/ShardMapManagerConcurrencyTests.cs
@@ -1,10 +1,9 @@
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+using System.Collections.Generic;
using Microsoft.Data.SqlClient;
-using Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement;
using Microsoft.VisualStudio.TestTools.UnitTesting;
-using System.Collections.Generic;
namespace Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement.UnitTests
{
diff --git a/Test/ElasticScale.ShardManagement.UnitTests/ShardMapManagerFactoryTests.cs b/Test/ElasticScale.ShardManagement.UnitTests/ShardMapManagerFactoryTests.cs
index c39a6f7..1941281 100644
--- a/Test/ElasticScale.ShardManagement.UnitTests/ShardMapManagerFactoryTests.cs
+++ b/Test/ElasticScale.ShardManagement.UnitTests/ShardMapManagerFactoryTests.cs
@@ -2,8 +2,8 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System;
-using Microsoft.Data.SqlClient;
using Microsoft.Azure.SqlDatabase.ElasticScale.Test.Common;
+using Microsoft.Data.SqlClient;
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement.UnitTests
diff --git a/Test/ElasticScale.ShardManagement.UnitTests/ShardMapManagerLoadTests.cs b/Test/ElasticScale.ShardManagement.UnitTests/ShardMapManagerLoadTests.cs
index e95e55a..d4afdf2 100644
--- a/Test/ElasticScale.ShardManagement.UnitTests/ShardMapManagerLoadTests.cs
+++ b/Test/ElasticScale.ShardManagement.UnitTests/ShardMapManagerLoadTests.cs
@@ -1,14 +1,13 @@
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-using Microsoft.Azure.SqlDatabase.ElasticScale;
-using Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement.Recovery;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using System.Collections.Generic;
-using Microsoft.Data.SqlClient;
using System.Diagnostics;
using System.Linq;
+using Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement.Recovery;
+using Microsoft.Data.SqlClient;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement.UnitTests
{
diff --git a/Test/ElasticScale.ShardManagement.UnitTests/ShardMapManagerTests.cs b/Test/ElasticScale.ShardManagement.UnitTests/ShardMapManagerTests.cs
index e04916f..e09e471 100644
--- a/Test/ElasticScale.ShardManagement.UnitTests/ShardMapManagerTests.cs
+++ b/Test/ElasticScale.ShardManagement.UnitTests/ShardMapManagerTests.cs
@@ -3,11 +3,9 @@
using System;
using System.Collections.Generic;
-using Microsoft.Data.SqlClient;
-using System.IO;
-using System.Runtime.Serialization.Formatters.Binary;
using Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement.UnitTests.Stubs;
using Microsoft.Azure.SqlDatabase.ElasticScale.Test.Common;
+using Microsoft.Data.SqlClient;
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement.UnitTests
diff --git a/Test/ElasticScale.ShardManagement.UnitTests/ShardMapManagerUpgradeTests.cs b/Test/ElasticScale.ShardManagement.UnitTests/ShardMapManagerUpgradeTests.cs
index 34ebe6a..3702a03 100644
--- a/Test/ElasticScale.ShardManagement.UnitTests/ShardMapManagerUpgradeTests.cs
+++ b/Test/ElasticScale.ShardManagement.UnitTests/ShardMapManagerUpgradeTests.cs
@@ -1,12 +1,11 @@
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-using Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement.Recovery;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
-using Microsoft.Data.SqlClient;
using System.Linq;
using Microsoft.Azure.SqlDatabase.ElasticScale.Test.Common;
+using Microsoft.Data.SqlClient;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement.UnitTests
{
diff --git a/Test/ElasticScale.ShardManagement.UnitTests/ShardMapTests.cs b/Test/ElasticScale.ShardManagement.UnitTests/ShardMapTests.cs
index f078ce5..a1ee56a 100644
--- a/Test/ElasticScale.ShardManagement.UnitTests/ShardMapTests.cs
+++ b/Test/ElasticScale.ShardManagement.UnitTests/ShardMapTests.cs
@@ -3,9 +3,9 @@
using System;
using System.Collections.Generic;
-using Microsoft.Data.SqlClient;
using System.Linq;
using Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement.UnitTests.Stubs;
+using Microsoft.Data.SqlClient;
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement.UnitTests
diff --git a/Test/ElasticScale.ShardManagement.UnitTests/ShardMapperTests.cs b/Test/ElasticScale.ShardManagement.UnitTests/ShardMapperTests.cs
index e05f1a6..e8ae57e 100644
--- a/Test/ElasticScale.ShardManagement.UnitTests/ShardMapperTests.cs
+++ b/Test/ElasticScale.ShardManagement.UnitTests/ShardMapperTests.cs
@@ -1,16 +1,16 @@
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-using Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement.UnitTests.Stubs;
-using Microsoft.Azure.SqlDatabase.ElasticScale.Test.Common;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using System.Collections.Generic;
using System.Data;
-using Microsoft.Data.SqlClient;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
+using Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement.UnitTests.Stubs;
+using Microsoft.Azure.SqlDatabase.ElasticScale.Test.Common;
+using Microsoft.Data.SqlClient;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement.UnitTests
{
diff --git a/Test/ElasticScale.ShardManagement.UnitTests/ShardRangeTests.cs b/Test/ElasticScale.ShardManagement.UnitTests/ShardRangeTests.cs
index 74f42c7..df20638 100644
--- a/Test/ElasticScale.ShardManagement.UnitTests/ShardRangeTests.cs
+++ b/Test/ElasticScale.ShardManagement.UnitTests/ShardRangeTests.cs
@@ -1,13 +1,11 @@
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
-using System.Collections.Generic;
-using Microsoft.Data.SqlClient;
using System.Diagnostics;
using System.Linq;
using Microsoft.Azure.SqlDatabase.ElasticScale.Test.Common;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement.UnitTests
{
diff --git a/Test/ElasticScale.ShardManagement.UnitTests/Stubs/StubSqlStoreConnectionFactory.cs b/Test/ElasticScale.ShardManagement.UnitTests/Stubs/StubSqlStoreConnectionFactory.cs
index a18a739..968938c 100644
--- a/Test/ElasticScale.ShardManagement.UnitTests/Stubs/StubSqlStoreConnectionFactory.cs
+++ b/Test/ElasticScale.ShardManagement.UnitTests/Stubs/StubSqlStoreConnectionFactory.cs
@@ -3,7 +3,6 @@
using System;
using System.Diagnostics;
-using Microsoft.Data.SqlClient;
namespace Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement.UnitTests.Stubs
{
diff --git a/Test/ElasticScale.ShardManagement.UnitTests/packages.config b/Test/ElasticScale.ShardManagement.UnitTests/packages.config
deleted file mode 100644
index 7ca59dd..0000000
--- a/Test/ElasticScale.ShardManagement.UnitTests/packages.config
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/build.props b/build.props
index 4d6123c..8f6d9ff 100644
--- a/build.props
+++ b/build.props
@@ -2,8 +2,4 @@
true
-
-
- $(DefineConstants);NETFRAMEWORK
-
\ No newline at end of file