Table of Contents

Delegate BrokeredServiceFactory<T>

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

Activates a new service instance for one client.

public delegate ValueTask<T?> BrokeredServiceFactory<T>(ServiceMoniker moniker, ServiceActivationOptions options, IServiceBroker serviceBroker, CancellationToken cancellationToken) where T : class

Parameters

moniker ServiceMoniker

The service identity requested by the client.

options ServiceActivationOptions

The client's activation data.

serviceBroker IServiceBroker

The broker to use for dependencies.

cancellationToken CancellationToken

Cancels activation.

Returns

ValueTask<T>

The client-owned instance, or null if unavailable.

Type Parameters

T

The primary service contract.