GlobalBrokeredServiceContainer.ProfferedViewIntrinsicService.GetProxyAsync 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
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
取消語彙基元。
傳回
ValueTask<T>
可用來與服務通訊的用戶端 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 類型。
參數
用來要求此服務的檢視。
- serviceDescriptor
- ServiceRpcDescriptor
服務的描述項。
- options
- ServiceActivationOptions
改變服務啟動方式的其他選項,或提供其他數據給服務建構函式。
- cancellationToken
- CancellationToken
取消語彙基元。
傳回
ValueTask<T>
可用來與服務通訊的用戶端 Proxy;如果找不到相符的服務,則 null
為 。
如果傳回 IDisposable的實例實作 ,就應該再不需要處置此專案。