共用方式為


HubClient.GetPipeAsync 方法

定義

透過 IDuplexPipe要求存取某些服務。

public System.Threading.Tasks.ValueTask<System.IO.Pipelines.IDuplexPipe> GetPipeAsync (Microsoft.ServiceHub.Framework.ServiceMoniker serviceMoniker, Microsoft.ServiceHub.Framework.ServiceActivationOptions options = default, System.Threading.CancellationToken cancellationToken = default);
public System.Threading.Tasks.ValueTask<System.IO.Pipelines.IDuplexPipe?> GetPipeAsync (Microsoft.ServiceHub.Framework.ServiceMoniker serviceMoniker, Microsoft.ServiceHub.Framework.ServiceActivationOptions options = default, System.Threading.CancellationToken cancellationToken = default);
abstract member GetPipeAsync : Microsoft.ServiceHub.Framework.ServiceMoniker * Microsoft.ServiceHub.Framework.ServiceActivationOptions * System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask<System.IO.Pipelines.IDuplexPipe>
override this.GetPipeAsync : Microsoft.ServiceHub.Framework.ServiceMoniker * Microsoft.ServiceHub.Framework.ServiceActivationOptions * System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask<System.IO.Pipelines.IDuplexPipe>
Public Function GetPipeAsync (serviceMoniker As ServiceMoniker, Optional options As ServiceActivationOptions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As ValueTask(Of IDuplexPipe)

參數

serviceMoniker
ServiceMoniker

服務的Moniker。

options
ServiceActivationOptions

改變服務啟用方式的其他選項,或將其他數據提供給服務建構函式。

cancellationToken
CancellationToken

取消語彙基元。

傳回

可用來與服務通訊的雙工管道;如果 null 找不到相符的服務,則為 。 當不再需要時,應該處置此專案。

實作

適用於