ServiceBrokerExtensions.GetProxyAsync Yöntem

Tanım

Aşırı Yüklemeler

GetProxyAsync<T>(IServiceBroker, ServiceJsonRpcDescriptor<T>, CancellationToken)

İstemci proxy 'si aracılığıyla bazı bir hizmete erişim ister.

GetProxyAsync<T>(IServiceBroker, ServiceRpcDescriptor, CancellationToken)

İstemci proxy 'si aracılığıyla bazı bir hizmete erişim ister.

GetProxyAsync<T>(IServiceBroker, ServiceJsonRpcDescriptor<T>, CancellationToken)

İstemci proxy 'si aracılığıyla bazı bir hizmete erişim ister.

public static System.Threading.Tasks.ValueTask<T>? GetProxyAsync<T> (this Microsoft.ServiceHub.Framework.IServiceBroker serviceBroker, Microsoft.ServiceHub.Framework.ServiceJsonRpcDescriptor<T> serviceDescriptor, System.Threading.CancellationToken cancellationToken = default) where T : class;
static member GetProxyAsync : Microsoft.ServiceHub.Framework.IServiceBroker * Microsoft.ServiceHub.Framework.ServiceJsonRpcDescriptor<'T (requires 'T : null)> * System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask<'T (requires 'T : null)> (requires 'T : null)
<Extension()>
Public Function GetProxyAsync(Of T As Class) (serviceBroker As IServiceBroker, serviceDescriptor As ServiceJsonRpcDescriptor(Of T), Optional cancellationToken As CancellationToken = Nothing) As ValueTask(Of T)

Tür Parametreleri

T

Oluşturulacak istemci proxy türü.

Parametreler

serviceBroker
IServiceBroker

Hizmet Aracısı.

serviceDescriptor
ServiceJsonRpcDescriptor<T>

Hizmetin tanımlayıcısı.

cancellationToken
CancellationToken

İptal belirteci.

Döndürülenler

ValueTask<T>

Hizmetle iletişim kurmak için kullanılabilecek istemci proxy 'si; ya da eşleşen bir hizmet bulunamazsa null . Bu, döndürülen örnek için artık gerekli olmadığında atılmalıdır IDisposable .

Şunlara uygulanır

GetProxyAsync<T>(IServiceBroker, ServiceRpcDescriptor, CancellationToken)

İstemci proxy 'si aracılığıyla bazı bir hizmete erişim ister.

public static System.Threading.Tasks.ValueTask<T>? GetProxyAsync<T> (this Microsoft.ServiceHub.Framework.IServiceBroker serviceBroker, Microsoft.ServiceHub.Framework.ServiceRpcDescriptor serviceDescriptor, System.Threading.CancellationToken cancellationToken = default) where T : class;
static member GetProxyAsync : Microsoft.ServiceHub.Framework.IServiceBroker * Microsoft.ServiceHub.Framework.ServiceRpcDescriptor * System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask<'T (requires 'T : null)> (requires 'T : null)
<Extension()>
Public Function GetProxyAsync(Of T As Class) (serviceBroker As IServiceBroker, serviceDescriptor As ServiceRpcDescriptor, Optional cancellationToken As CancellationToken = Nothing) As ValueTask(Of T)

Tür Parametreleri

T

Oluşturulacak istemci proxy türü.

Parametreler

serviceBroker
IServiceBroker

Hizmet Aracısı.

serviceDescriptor
ServiceRpcDescriptor

Hizmetin tanımlayıcısı.

cancellationToken
CancellationToken

İptal belirteci.

Döndürülenler

ValueTask<T>

Hizmetle iletişim kurmak için kullanılabilecek istemci proxy 'si; ya da eşleşen bir hizmet bulunamazsa null . Bu, döndürülen örnek için artık gerekli olmadığında atılmalıdır IDisposable .

Özel durumlar

Bir hizmet bulma veya etkinleştirme hatası oluştuğunda oluşturulur.

Şunlara uygulanır