RemoteServiceBroker.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);
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

服务的名称对象。

options
ServiceActivationOptions

其他选项可更改服务的激活方式,或向服务构造函数提供其他数据。

cancellationToken
CancellationToken

取消标记。

返回

可用于与服务通信的双工管道;如果找不到匹配的服务,则为 。null 当不再需要时,应释放此权限。

实现

适用于