Share via


ExtensionCore.ProfferedServiceFactory Delegate

Definition

A delegate that creates new instances of a brokered service that is proffered via ProfferService.

public delegate System.Threading.Tasks.Task<object> ExtensionCore.ProfferedServiceFactory(ServiceMoniker moniker, ServiceActivationOptions options, IServiceProvider serviceProvider, AuthorizationServiceClient authorizationServiceClient, CancellationToken cancellationToken);
type ExtensionCore.ProfferedServiceFactory = delegate of ServiceMoniker * ServiceActivationOptions * IServiceProvider * AuthorizationServiceClient * CancellationToken -> Task<obj>
Public Delegate Function ExtensionCore.ProfferedServiceFactory(moniker As ServiceMoniker, options As ServiceActivationOptions, serviceProvider As IServiceProvider, authorizationServiceClient As AuthorizationServiceClient, cancellationToken As CancellationToken) As Task(Of Object) 

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.

serviceProvider
IServiceProvider

Service provider that contains extension scoped services including IServiceBroker.

authorizationServiceClient
AuthorizationServiceClient

The authorization service for this brokered service to use. Must be disposed of by the service or the service factory, unless the service factory itself throws an exception.

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