RemoteServiceBroker.GetProxyAsync<T> Metoda

Definicja

Żąda dostępu do niektórych usług za pośrednictwem serwera proxy klienta.

public System.Threading.Tasks.ValueTask<T?> GetProxyAsync<T> (Microsoft.ServiceHub.Framework.ServiceRpcDescriptor serviceDescriptor, Microsoft.ServiceHub.Framework.ServiceActivationOptions options = default, System.Threading.CancellationToken cancellationToken = default) where T : class;
abstract member GetProxyAsync : Microsoft.ServiceHub.Framework.ServiceRpcDescriptor * Microsoft.ServiceHub.Framework.ServiceActivationOptions * System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask<'T (requires 'T : null)> (requires 'T : null)
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 Function GetProxyAsync(Of T As Class) (serviceDescriptor As ServiceRpcDescriptor, Optional options As ServiceActivationOptions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As ValueTask(Of T)

Parametry typu

T

Typ serwera proxy klienta do utworzenia.

Parametry

serviceDescriptor
ServiceRpcDescriptor

Deskryptor usługi.

options
ServiceActivationOptions

Dodatkowe opcje, które zmieniają sposób aktywowania usługi lub udostępniają dodatkowe dane konstruktorowi usługi.

cancellationToken
CancellationToken

Token anulowania.

Zwraca

Serwer proxy klienta, który może służyć do komunikowania się z usługą; lub null jeśli nie można odnaleźć pasującej usługi. Powinno to zostać usunięte, gdy wystąpienie nie będzie już wymagane, jeśli wystąpienie zwróciło implementację IDisposable.

Implementuje

Dotyczy