RemoteServiceBroker.ConnectToServerAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
ConnectToServerAsync(IDuplexPipe, TraceSource, CancellationToken) |
Initializes a new instance of the RemoteServiceBroker class. |
ConnectToServerAsync(String, CancellationToken) |
Initializes a new instance of the RemoteServiceBroker class. |
ConnectToServerAsync(String, TraceSource, CancellationToken) |
Initializes a new instance of the RemoteServiceBroker class. |
ConnectToServerAsync(IRemoteServiceBroker, CancellationToken) |
Initializes a new instance of the RemoteServiceBroker class. |
ConnectToServerAsync(IDuplexPipe, CancellationToken) |
Initializes a new instance of the RemoteServiceBroker class. |
ConnectToServerAsync(IDuplexPipe, TraceSource, CancellationToken)
Initializes a new instance of the RemoteServiceBroker class.
public static System.Threading.Tasks.Task<Microsoft.ServiceHub.Framework.RemoteServiceBroker> ConnectToServerAsync (System.IO.Pipelines.IDuplexPipe pipe, System.Diagnostics.TraceSource? traceSource, System.Threading.CancellationToken cancellationToken = default);
static member ConnectToServerAsync : System.IO.Pipelines.IDuplexPipe * System.Diagnostics.TraceSource * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.ServiceHub.Framework.RemoteServiceBroker>
Public Shared Function ConnectToServerAsync (pipe As IDuplexPipe, traceSource As TraceSource, Optional cancellationToken As CancellationToken = Nothing) As Task(Of RemoteServiceBroker)
Parameters
- pipe
- IDuplexPipe
A duplex pipe over which to exchange JSON-RPC messages with an IRemoteServiceBroker service. This object is considered "owned" by the returned RemoteServiceBroker and will be completed when the returned value is disposed, or completed before this method throws.
- traceSource
- TraceSource
An optional means of logging activity.
- cancellationToken
- CancellationToken
A cancellation token.
Returns
An IServiceBroker that provides access to remote services.
Remarks
The RemoteServiceBroker is used as the wire protocol.
Applies to
ConnectToServerAsync(String, CancellationToken)
Initializes a new instance of the RemoteServiceBroker class.
public static System.Threading.Tasks.Task<Microsoft.ServiceHub.Framework.RemoteServiceBroker> ConnectToServerAsync (string pipeName, System.Threading.CancellationToken cancellationToken = default);
static member ConnectToServerAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.ServiceHub.Framework.RemoteServiceBroker>
Public Shared Function ConnectToServerAsync (pipeName As String, Optional cancellationToken As CancellationToken = Nothing) As Task(Of RemoteServiceBroker)
Parameters
- pipeName
- String
The name of a pipe over which to exchange JSON-RPC messages with an IRemoteServiceBroker service.
- cancellationToken
- CancellationToken
A cancellation token.
Returns
An IServiceBroker that provides access to remote services.
Remarks
The RemoteServiceBroker is used as the wire protocol.
Applies to
ConnectToServerAsync(String, TraceSource, CancellationToken)
Initializes a new instance of the RemoteServiceBroker class.
public static System.Threading.Tasks.Task<Microsoft.ServiceHub.Framework.RemoteServiceBroker> ConnectToServerAsync (string pipeName, System.Diagnostics.TraceSource? traceSource, System.Threading.CancellationToken cancellationToken = default);
static member ConnectToServerAsync : string * System.Diagnostics.TraceSource * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.ServiceHub.Framework.RemoteServiceBroker>
Public Shared Function ConnectToServerAsync (pipeName As String, traceSource As TraceSource, Optional cancellationToken As CancellationToken = Nothing) As Task(Of RemoteServiceBroker)
Parameters
- pipeName
- String
The name of a pipe over which to exchange JSON-RPC messages with an IRemoteServiceBroker service.
- traceSource
- TraceSource
An optional means of logging activity.
- cancellationToken
- CancellationToken
A cancellation token.
Returns
An IServiceBroker that provides access to remote services.
Remarks
The RemoteServiceBroker is used as the wire protocol.
Applies to
ConnectToServerAsync(IRemoteServiceBroker, CancellationToken)
Initializes a new instance of the RemoteServiceBroker class.
public static System.Threading.Tasks.Task<Microsoft.ServiceHub.Framework.RemoteServiceBroker> ConnectToServerAsync (Microsoft.ServiceHub.Framework.IRemoteServiceBroker serviceBroker, System.Threading.CancellationToken cancellationToken = default);
static member ConnectToServerAsync : Microsoft.ServiceHub.Framework.IRemoteServiceBroker * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.ServiceHub.Framework.RemoteServiceBroker>
Public Shared Function ConnectToServerAsync (serviceBroker As IRemoteServiceBroker, Optional cancellationToken As CancellationToken = Nothing) As Task(Of RemoteServiceBroker)
Parameters
- serviceBroker
- IRemoteServiceBroker
An existing proxy established to acquire remote services. This object is considered "owned" by the returned RemoteServiceBroker and will be disposed when the returned value is disposed, or disposed before this method throws.
- cancellationToken
- CancellationToken
A cancellation token.
Returns
An IServiceBroker that provides access to remote services.
Remarks
The RemoteServiceBroker is used as the wire protocol.
Applies to
ConnectToServerAsync(IDuplexPipe, CancellationToken)
Initializes a new instance of the RemoteServiceBroker class.
public static System.Threading.Tasks.Task<Microsoft.ServiceHub.Framework.RemoteServiceBroker> ConnectToServerAsync (System.IO.Pipelines.IDuplexPipe pipe, System.Threading.CancellationToken cancellationToken = default);
static member ConnectToServerAsync : System.IO.Pipelines.IDuplexPipe * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.ServiceHub.Framework.RemoteServiceBroker>
Public Shared Function ConnectToServerAsync (pipe As IDuplexPipe, Optional cancellationToken As CancellationToken = Nothing) As Task(Of RemoteServiceBroker)
Parameters
- pipe
- IDuplexPipe
A duplex pipe over which to exchange JSON-RPC messages with an IRemoteServiceBroker service. This object is considered "owned" by the returned RemoteServiceBroker and will be completed when the returned value is disposed, or completed before this method throws.
- cancellationToken
- CancellationToken
A cancellation token.
Returns
An IServiceBroker that provides access to remote services.
Remarks
The RemoteServiceBroker is used as the wire protocol.