Share via


GlobalBrokeredServiceContainer.ViewIntrinsicBrokeredServiceFactory Delegate

Definition

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

protected delegate System.Threading.Tasks.ValueTask<object?> GlobalBrokeredServiceContainer.ViewIntrinsicBrokeredServiceFactory(GlobalBrokeredServiceContainer.View view, ServiceMoniker moniker, ServiceActivationOptions options, IServiceBroker serviceBroker, CancellationToken cancellationToken);
Protected Delegate Function GlobalBrokeredServiceContainer.ViewIntrinsicBrokeredServiceFactory(view As GlobalBrokeredServiceContainer.View, moniker As ServiceMoniker, options As ServiceActivationOptions, serviceBroker As IServiceBroker, cancellationToken As CancellationToken) As ValueTask(Of Object) 

Parameters

view
GlobalBrokeredServiceContainer.View

The view that this service is being activated within.

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.

Remarks

This delegate is modeled after GlobalBrokeredServiceContainer.ProfferedServiceFactory but adds the GlobalBrokeredServiceContainer.View parameter.

Applies to

See also