Table of Contents

Interface IMultiVersionedServiceFactory

Namespace
Microsoft.ServiceHub.Framework
Assembly
Microsoft.ServiceHub.Framework.dll

Describes a class that can create a ServiceHub service.

public interface IMultiVersionedServiceFactory

Methods

CreateAsync(IServiceProvider, ServiceMoniker, ServiceActivationOptions, IServiceBroker, AuthorizationServiceClient, CancellationToken)

Creates an instance of a ServiceHub service asynchronously.

Task<object> CreateAsync(IServiceProvider hostProvidedServices, ServiceMoniker serviceMoniker, ServiceActivationOptions serviceActivationOptions, IServiceBroker serviceBroker, AuthorizationServiceClient authorizationServiceClient, CancellationToken cancellationToken)

Parameters

hostProvidedServices IServiceProvider

Provides other services to the service.

serviceMoniker ServiceMoniker

An identifier for a service.

serviceActivationOptions ServiceActivationOptions

The activation options used to start the service.

serviceBroker IServiceBroker

The IServiceBroker that can be used to request additional services.

authorizationServiceClient AuthorizationServiceClient

The AuthorizationServiceClient retrieved from the IServiceBroker.

cancellationToken CancellationToken

A cancellation token.

Returns

Task<object>

An instance of a ServiceHub service that implements.

Remarks

Uses GetServiceDescriptor(ServiceMoniker) to establishes an RPC connection over an IDuplexPipe. Adds ServiceHub service object to receive RPC calls and begins listening for incoming messages. The service will only be disposed if the ServiceRpcDescriptor does on disconnection.

GetServiceDescriptor(ServiceMoniker)

Gets the description of a service.

ServiceRpcDescriptor GetServiceDescriptor(ServiceMoniker serviceMoniker)

Parameters

serviceMoniker ServiceMoniker

An identifier for a service.

Returns

ServiceRpcDescriptor

An instance of a ServiceRpcDescriptor.