Udostępnij za pośrednictwem


GlobalBrokeredServiceContainer.View.GetProxyAsync<T> Metoda

Definicja

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

public virtual System.Threading.Tasks.ValueTask<T?> GetProxyAsync<T> (Microsoft.ServiceHub.Framework.ServiceRpcDescriptor serviceDescriptor, Microsoft.ServiceHub.Framework.ServiceActivationOptions options, System.Threading.CancellationToken cancellationToken) 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 Overridable Function GetProxyAsync(Of T As Class) (serviceDescriptor As ServiceRpcDescriptor, options As ServiceActivationOptions, cancellationToken As CancellationToken) 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 zwrócone wystąpienie implementuje IDisposableelement .

Implementuje

Dotyczy