C# Class Drey.Configuration.Infrastructure.HubConnectionManager

Monitors and heals a HubConnection upon failure
Inheritance: IHubConnectionManager, IDisposable
Show file Open project: dealproc/Drey Class Usage Examples

Public Methods

Method Description
CreateHubProxy ( string hubName ) : IHubProxy

Creates the hub proxy.

Dispose ( ) : void

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

GetHubConnectionManager ( HubConnection hubConnection ) : IHubConnectionManager

Gets the hub connection manager.

GetHubConnectionManager ( string url ) : IHubConnectionManager

Gets the hub connection manager.

Initialize ( ) : System.Threading.Tasks.Task

Initializes the HubConnection and starts the connection with the server.

Stop ( ) : void

Shuts-down the managed HubConnection.

UseClientCertificate ( X509Certificate2 cert ) : void

Allows the use of a client certificate by the hubconnection for client identification by the server.

Protected Methods

Method Description
Dispose ( bool disposing ) : void

Releases unmanaged and - optionally - managed resources.

Private Methods

Method Description
HubConnectionManager ( HubConnection hubConnection ) : Drey.Logging

Initializes a new instance of the HubConnectionManager class. This allows the capability of providing a custom configured HubConnection to be managed.

HubConnectionManager ( string url ) : Drey.Logging

Initializes a new instance of the HubConnectionManager class. This creates a hubconnection with default options, and assigns the provided url.

OnClosed ( ) : void
OnConnectionSlow ( ) : void
OnError ( Exception error ) : void
OnReceived ( string data ) : void
OnReconnected ( ) : void
OnReconnecting ( ) : void
OnStateChanged ( StateChange stateChange ) : void
RetryConnection ( ) : System.Threading.Tasks.Task
StartConnectionInternal ( ) : System.Threading.Tasks.Task

Method Details

CreateHubProxy() public method

Creates the hub proxy.
hubName
public CreateHubProxy ( string hubName ) : IHubProxy
hubName string Name of the hub.
return IHubProxy

Dispose() public method

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public Dispose ( ) : void
return void

Dispose() protected method

Releases unmanaged and - optionally - managed resources.
protected Dispose ( bool disposing ) : void
disposing bool true to release both managed and unmanaged resources; false to release only unmanaged resources.
return void

GetHubConnectionManager() public static method

Gets the hub connection manager.
public static GetHubConnectionManager ( HubConnection hubConnection ) : IHubConnectionManager
hubConnection Microsoft.AspNet.SignalR.Client.HubConnection The hub connection.
return IHubConnectionManager

GetHubConnectionManager() public static method

Gets the hub connection manager.
public static GetHubConnectionManager ( string url ) : IHubConnectionManager
url string The URL.
return IHubConnectionManager

Initialize() public method

Initializes the HubConnection and starts the connection with the server.
public Initialize ( ) : System.Threading.Tasks.Task
return System.Threading.Tasks.Task

Stop() public method

Shuts-down the managed HubConnection.
public Stop ( ) : void
return void

UseClientCertificate() public method

Allows the use of a client certificate by the hubconnection for client identification by the server.
public UseClientCertificate ( X509Certificate2 cert ) : void
cert System.Security.Cryptography.X509Certificates.X509Certificate2 The cert.
return void