Allow connections on non-default port (#462)

* Allow custom port

* Update unit tests for port property
This commit is contained in:
Karl Burtram
2017-09-21 08:26:13 -07:00
committed by GitHub
parent c90fd3410d
commit 60aad9cf7e
5 changed files with 109 additions and 55 deletions

View File

@@ -418,6 +418,22 @@ namespace Microsoft.SqlTools.ServiceLayer.Connection.Contracts
}
}
/// <summary>
/// Gets or sets the port to use for the TCP/IP connection
/// </summary>
public int? Port
{
get
{
return GetOptionValue<int?>("port");
}
set
{
SetOptionValue("port", value);
}
}
/// <summary>
/// Gets or sets a string value that indicates the type system the application expects.
/// </summary>

View File

@@ -43,7 +43,8 @@ namespace Microsoft.SqlTools.ServiceLayer.Connection.Contracts
MultipleActiveResultSets = details.MultipleActiveResultSets,
PacketSize = details.PacketSize,
TypeSystemVersion = details.TypeSystemVersion,
ConnectionString = details.ConnectionString
ConnectionString = details.ConnectionString,
Port = details.Port
};
}
}