Table of Contents

Class ServiceBrokerExtensions

Namespace
Nerdbank.JsonRpc.BrokeredServices
Assembly
Nerdbank.JsonRpc.dll

Provides resilient service acquisition for service brokers.

public static class ServiceBrokerExtensions
Inheritance
ServiceBrokerExtensions
Inherited Members

Methods

GetResilientProxyAsync<T>(IServiceBroker, IJsonRpcDescriptor<T>, ServiceActivationOptions, ILogger<ServiceProxyContext>?, CancellationToken)

Creates and initializes a stable proxy, including when the service is currently unavailable.

public static ValueTask<ResilientServiceProxy<T>> GetResilientProxyAsync<T>(this IServiceBroker broker, IJsonRpcDescriptor<T> descriptor, ServiceActivationOptions options = default, ILogger<ServiceProxyContext>? logger = null, CancellationToken cancellationToken = default) where T : class

Parameters

broker IServiceBroker

The broker to observe.

descriptor IJsonRpcDescriptor<T>

The typed contract and its complete allowed additional-interface universe.

options ServiceActivationOptions

Options for each activation.

logger ILogger<ServiceProxyContext>

The lifecycle logger.

cancellationToken CancellationToken

Cancels initial acquisition.

Returns

ValueTask<ResilientServiceProxy<T>>

The disposable owner of the stable generated proxy.

Type Parameters

T

The primary service interface.