BrokeredServiceFactory Delegate

Definition

A delegate that creates new instances of a service to be exposed by an IServiceBroker.

C++
public delegate System::Threading::Tasks::ValueTask<System::Object ^> BrokeredServiceFactory(ServiceMoniker ^ moniker, ServiceActivationOptions options, IServiceBroker ^ serviceBroker, CancellationToken cancellationToken);

Parameters

moniker
ServiceMoniker

The identifier for the service that is requested.

options
ServiceActivationOptions

Additional options that alter how the service may be activated or provide additional data to the service constructor.

serviceBroker
IServiceBroker

The service broker that the service returned from this delegate should use to obtain any of its own dependencies.

cancellationToken
CancellationToken

A token to indicate that the caller has lost interest in the result.

Return Value

A unique instance of the service. If the value implements IDisposable, the value will be disposed when the client disconnects.

Applies to

Produkt Verzie
Visual Studio SDK 2019, 2022

See also