GlobalBrokeredServiceContainer.ProfferedServiceFactory.GetProxyAsync<T> Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Requests access to some service through a client proxy.
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)
Type Parameters
- T
The type of client proxy to create.
Parameters
- serviceDescriptor
- ServiceRpcDescriptor
An descriptor of the service.
- options
- ServiceActivationOptions
Additional options that alter how the service may be activated or provide additional data to the service constructor.
- cancellationToken
- CancellationToken
A cancellation token.
Returns
The client proxy that may be used to communicate with the service; or null
if no matching service could be found.
This should be disposed when no longer required if the instance returned implements IDisposable.