共用方式為


GlobalBrokeredServiceContainer.ProfferedViewIntrinsicService.GetProxyAsync 方法

定義

多載

GetProxyAsync<T>(ServiceRpcDescriptor, ServiceActivationOptions, CancellationToken)
已淘汰.

要求透過用戶端 Proxy 存取某些服務。

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

要求透過用戶端 Proxy 存取某些服務。

GetProxyAsync<T>(ServiceRpcDescriptor, ServiceActivationOptions, CancellationToken)

警告

Use the overload that takes a View instead.

要求透過用戶端 Proxy 存取某些服務。

[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

要建立的用戶端 Proxy 類型。

參數

serviceDescriptor
ServiceRpcDescriptor

服務的描述項。

options
ServiceActivationOptions

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

cancellationToken
CancellationToken

取消語彙基元。

傳回

可用來與服務通訊的用戶端 Proxy;如果找不到相符的服務,則 null 為 。 如果傳回 IDisposable的實例實作 ,就應該再不需要處置此專案。

屬性

適用於

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

要求透過用戶端 Proxy 存取某些服務。

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

要建立的用戶端 Proxy 類型。

參數

view
GlobalBrokeredServiceContainer.View

用來要求此服務的檢視。

serviceDescriptor
ServiceRpcDescriptor

服務的描述項。

options
ServiceActivationOptions

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

cancellationToken
CancellationToken

取消語彙基元。

傳回

可用來與服務通訊的用戶端 Proxy;如果找不到相符的服務,則 null 為 。 如果傳回 IDisposable的實例實作 ,就應該再不需要處置此專案。

適用於