Compartilhar via


IRemoteServiceBroker.RequestServiceChannelAsync Method

Definition

Gets a pipe to a service.

public System.Threading.Tasks.Task<Microsoft.ServiceHub.Framework.RemoteServiceConnectionInfo> RequestServiceChannelAsync (Microsoft.ServiceHub.Framework.ServiceMoniker serviceMoniker, Microsoft.ServiceHub.Framework.ServiceActivationOptions options = default, System.Threading.CancellationToken cancellationToken = default);
abstract member RequestServiceChannelAsync : Microsoft.ServiceHub.Framework.ServiceMoniker * Microsoft.ServiceHub.Framework.ServiceActivationOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.ServiceHub.Framework.RemoteServiceConnectionInfo>
Public Function RequestServiceChannelAsync (serviceMoniker As ServiceMoniker, Optional options As ServiceActivationOptions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of RemoteServiceConnectionInfo)

Parameters

serviceMoniker
ServiceMoniker

The moniker for the service.

options
ServiceActivationOptions

Additional options that alter how the service may be activated or provide additional data to the service constructor.

cancellationToken
CancellationToken

A cancellation token.

Returns

Instructions for how the client may connect to the service.

Remarks

Upon successful completion, resources may have already been allocated for the anticipated connection. If the connection will not be made (either because the client lost interest or cannot follow the instructions), the client should call CancelServiceRequestAsync(Guid) with the value of RequestId to release the allocated resources.

Applies to