Share via


HubClient.RequestServiceAsync Method

Definition

Overloads

RequestServiceAsync(ServiceDescriptor, CancellationToken)

Locate and start a service module on Service Hub.

RequestServiceAsync(String, CancellationToken)

Locate and start a service module on Service Hub.

RequestServiceAsync(ServiceDescriptor, CancellationToken)

Locate and start a service module on Service Hub.

public virtual System.Threading.Tasks.Task<System.IO.Stream> RequestServiceAsync (Microsoft.ServiceHub.Client.ServiceDescriptor serviceDescriptor, System.Threading.CancellationToken cancellationToken = default);
abstract member RequestServiceAsync : Microsoft.ServiceHub.Client.ServiceDescriptor * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.IO.Stream>
override this.RequestServiceAsync : Microsoft.ServiceHub.Client.ServiceDescriptor * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.IO.Stream>
Public Overridable Function RequestServiceAsync (serviceDescriptor As ServiceDescriptor, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Stream)

Parameters

serviceDescriptor
ServiceDescriptor

Service descriptor, not null.

cancellationToken
CancellationToken

A cancellation token.

Returns

A stream to the service, not null. The client must dispose of it when done communicating with the service module.

Applies to

RequestServiceAsync(String, CancellationToken)

Locate and start a service module on Service Hub.

public virtual System.Threading.Tasks.Task<System.IO.Stream> RequestServiceAsync (string serviceName, System.Threading.CancellationToken cancellationToken = default);
abstract member RequestServiceAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.IO.Stream>
override this.RequestServiceAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.IO.Stream>
Public Overridable Function RequestServiceAsync (serviceName As String, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Stream)

Parameters

serviceName
String

Service name.

cancellationToken
CancellationToken

A cancellation token.

Returns

A stream to the service, not null. The client must dispose of it when done communicating with the service module.

Applies to