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
monikerServiceMonikerThe service identity requested by the client.
optionsServiceActivationOptionsThe client's activation data.
serviceBrokerIServiceBrokerThe broker to use for dependencies.
cancellationTokenCancellationTokenCancels activation.
Returns
- ValueTask<T>
The client-owned instance, or null if unavailable.
Type Parameters
TThe primary service contract.