다음을 통해 공유


AuthorizingBrokeredServiceFactory Delegate

Definition

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

public delegate System::Threading::Tasks::ValueTask<System::Object ^> AuthorizingBrokeredServiceFactory(ServiceMoniker ^ moniker, ServiceActivationOptions options, IServiceBroker ^ serviceBroker, AuthorizationServiceClient ^ authorizationServiceClient, CancellationToken cancellationToken);
public delegate System.Threading.Tasks.ValueTask<object?> AuthorizingBrokeredServiceFactory(ServiceMoniker moniker, ServiceActivationOptions options, IServiceBroker serviceBroker, AuthorizationServiceClient authorizationServiceClient, CancellationToken cancellationToken);
type AuthorizingBrokeredServiceFactory = delegate of ServiceMoniker * ServiceActivationOptions * IServiceBroker * AuthorizationServiceClient * CancellationToken -> ValueTask<obj>
Public Delegate Function AuthorizingBrokeredServiceFactory(moniker As ServiceMoniker, options As ServiceActivationOptions, serviceBroker As IServiceBroker, authorizationServiceClient As AuthorizationServiceClient, cancellationToken As CancellationToken) As ValueTask(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.

serviceBroker
IServiceBroker

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

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

See also