Add Url + ILoggerFactory ctor for HubConnection (#253)
This commit is contained in:
parent
0abac4a20d
commit
c3b33a2676
|
|
@ -46,14 +46,14 @@ namespace Microsoft.AspNetCore.SignalR.Client
|
|||
remove { _connection.Closed -= value; }
|
||||
}
|
||||
|
||||
public HubConnection(Uri url, IInvocationAdapter adapter)
|
||||
: this(new Connection(url), adapter, null)
|
||||
{ }
|
||||
|
||||
public HubConnection(Uri url)
|
||||
: this(new Connection(url), new JsonNetInvocationAdapter(), null)
|
||||
{ }
|
||||
|
||||
public HubConnection(Uri url, ILoggerFactory loggerFactory)
|
||||
: this(new Connection(url), new JsonNetInvocationAdapter(), loggerFactory)
|
||||
{ }
|
||||
|
||||
public HubConnection(Uri url, IInvocationAdapter adapter, ILoggerFactory loggerFactory)
|
||||
: this(new Connection(url, loggerFactory), adapter, loggerFactory)
|
||||
{ }
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ namespace Microsoft.AspNetCore.SignalR.Client.FunctionalTests
|
|||
using (var httpClient = _testServer.CreateClient())
|
||||
{
|
||||
var transport = new LongPollingTransport(httpClient, loggerFactory);
|
||||
var connection = new HubConnection(new Uri("http://test/hubs"), new JsonNetInvocationAdapter());
|
||||
var connection = new HubConnection(new Uri("http://test/hubs"));
|
||||
try
|
||||
{
|
||||
await connection.StartAsync(transport, httpClient);
|
||||
|
|
@ -76,7 +76,7 @@ namespace Microsoft.AspNetCore.SignalR.Client.FunctionalTests
|
|||
using (var httpClient = _testServer.CreateClient())
|
||||
{
|
||||
var transport = new LongPollingTransport(httpClient, loggerFactory);
|
||||
var connection = new HubConnection(new Uri("http://test/hubs"), new JsonNetInvocationAdapter());
|
||||
var connection = new HubConnection(new Uri("http://test/hubs"));
|
||||
try
|
||||
{
|
||||
await connection.StartAsync(transport, httpClient);
|
||||
|
|
@ -126,7 +126,7 @@ namespace Microsoft.AspNetCore.SignalR.Client.FunctionalTests
|
|||
using (var httpClient = _testServer.CreateClient())
|
||||
{
|
||||
var transport = new LongPollingTransport(httpClient, loggerFactory);
|
||||
var connection = new HubConnection(new Uri("http://test/hubs"), new JsonNetInvocationAdapter());
|
||||
var connection = new HubConnection(new Uri("http://test/hubs"));
|
||||
try
|
||||
{
|
||||
await connection.StartAsync(transport, httpClient);
|
||||
|
|
@ -156,7 +156,7 @@ namespace Microsoft.AspNetCore.SignalR.Client.FunctionalTests
|
|||
using (var httpClient = _testServer.CreateClient())
|
||||
{
|
||||
var transport = new LongPollingTransport(httpClient, loggerFactory);
|
||||
var connection = new HubConnection(new Uri("http://test/hubs"), new JsonNetInvocationAdapter());
|
||||
var connection = new HubConnection(new Uri("http://test/hubs"));
|
||||
try
|
||||
{
|
||||
await connection.StartAsync(transport, httpClient);
|
||||
|
|
|
|||
Loading…
Reference in New Issue