Feature/reliable connection (#44)

* Initial commit of reliable connection port

* Made ReliableSqlConnection inherit from DbConnection instead of IDbConnection

* Cleanup

* Fixed autocomplete service to use reliable connection

* Fix copyright headers

* Renamed ConnectResponse.Server to ServerInfo

* Removed unused using

* Addressing code review feedback
This commit is contained in:
Mitchell Sternke
2016-09-13 18:10:26 -07:00
committed by GitHub
parent 92eb1376c1
commit f2a5654a20
41 changed files with 6358 additions and 16 deletions

View File

@@ -4,7 +4,7 @@
//
using System.Data.Common;
using System.Data.SqlClient;
using Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection;
namespace Microsoft.SqlTools.ServiceLayer.Connection
{
@@ -20,7 +20,9 @@ namespace Microsoft.SqlTools.ServiceLayer.Connection
/// </summary>
public DbConnection CreateSqlConnection(string connectionString)
{
return new SqlConnection(connectionString);
RetryPolicy connectionRetryPolicy = RetryPolicyFactory.CreateDefaultConnectionRetryPolicy();
RetryPolicy commandRetryPolicy = RetryPolicyFactory.CreateDefaultConnectionRetryPolicy();
return new ReliableSqlConnection(connectionString, connectionRetryPolicy, commandRetryPolicy);
}
}
}