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
hostProvidedServicesIServiceProviderProvides other services to the service.
serviceMonikerServiceMonikerAn identifier for a service.
serviceActivationOptionsServiceActivationOptionsThe activation options used to start the service.
serviceBrokerIServiceBrokerThe IServiceBroker that can be used to request additional services.
authorizationServiceClientAuthorizationServiceClientThe AuthorizationServiceClient retrieved from the IServiceBroker.
cancellationTokenCancellationTokenA cancellation token.
Returns
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
serviceMonikerServiceMonikerAn identifier for a service.
Returns
- ServiceRpcDescriptor
An instance of a ServiceRpcDescriptor.