GlobalBrokeredServiceContainer.ProfferedViewIntrinsicService.GetProxyAsync 方法

定义

重载

GetProxyAsync<T>(ServiceRpcDescriptor, ServiceActivationOptions, CancellationToken)
已过时.

通过客户端代理请求访问某些服务。

GetProxyAsync<T>(GlobalBrokeredServiceContainer+View, ServiceRpcDescriptor, ServiceActivationOptions, CancellationToken)

通过客户端代理请求访问某些服务。

GetProxyAsync<T>(ServiceRpcDescriptor, ServiceActivationOptions, CancellationToken)

注意

Use the overload that takes a View instead.

通过客户端代理请求访问某些服务。

[System.Obsolete("Use the overload that takes a View instead.", true)]
public override System.Threading.Tasks.ValueTask<T?> GetProxyAsync<T> (Microsoft.ServiceHub.Framework.ServiceRpcDescriptor serviceDescriptor, Microsoft.ServiceHub.Framework.ServiceActivationOptions options, System.Threading.CancellationToken cancellationToken) where T : class;
[<System.Obsolete("Use the overload that takes a View instead.", true)>]
override this.GetProxyAsync : Microsoft.ServiceHub.Framework.ServiceRpcDescriptor * Microsoft.ServiceHub.Framework.ServiceActivationOptions * System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask<'T (requires 'T : null)> (requires 'T : null)
Public Overrides Function GetProxyAsync(Of T As Class) (serviceDescriptor As ServiceRpcDescriptor, options As ServiceActivationOptions, cancellationToken As CancellationToken) As ValueTask(Of T)

类型参数

T

要创建的客户端代理的类型。

参数

serviceDescriptor
ServiceRpcDescriptor

服务的描述符。

options
ServiceActivationOptions

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

cancellationToken
CancellationToken

取消标记。

返回

可用于与服务通信的客户端代理;如果找不到匹配的服务,则为 或 null 。 如果返回的实例实现了 IDisposable,则当不再需要时,应将其释放。

属性

适用于

GetProxyAsync<T>(GlobalBrokeredServiceContainer+View, ServiceRpcDescriptor, ServiceActivationOptions, CancellationToken)

通过客户端代理请求访问某些服务。

public System.Threading.Tasks.ValueTask<T?> GetProxyAsync<T> (Microsoft.VisualStudio.Utilities.ServiceBroker.GlobalBrokeredServiceContainer.View view, Microsoft.ServiceHub.Framework.ServiceRpcDescriptor serviceDescriptor, Microsoft.ServiceHub.Framework.ServiceActivationOptions options = default, System.Threading.CancellationToken cancellationToken = default) where T : class;
override this.GetProxyAsync : Microsoft.VisualStudio.Utilities.ServiceBroker.GlobalBrokeredServiceContainer.View * Microsoft.ServiceHub.Framework.ServiceRpcDescriptor * Microsoft.ServiceHub.Framework.ServiceActivationOptions * System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask<'T (requires 'T : null)> (requires 'T : null)
Public Function GetProxyAsync(Of T As Class) (view As GlobalBrokeredServiceContainer.View, serviceDescriptor As ServiceRpcDescriptor, Optional options As ServiceActivationOptions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As ValueTask(Of T)

类型参数

T

要创建的客户端代理的类型。

参数

view
GlobalBrokeredServiceContainer.View

用于请求此服务的视图。

serviceDescriptor
ServiceRpcDescriptor

服务的描述符。

options
ServiceActivationOptions

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

cancellationToken
CancellationToken

取消标记。

返回

可用于与服务通信的客户端代理;如果找不到匹配的服务,则为 或 null 。 如果返回的实例实现了 IDisposable,则当不再需要时,应将其释放。

适用于