Interface IMigrationServiceFactoryCollection
Interface for an object that contains service factory overrides registered for each service type.
Namespace: Tableau.Migration.Engine.Services
Assembly: Tableau.Migration.dll
Syntax
public interface IMigrationServiceFactoryCollection
Methods
GetServiceFactory(Type)
Gets the service factory override for the given service type.
Declaration
MigrationServiceFactory? GetServiceFactory(Type serviceType)
Parameters
| Type | Name | Description |
|---|---|---|
| Type | serviceType | The service type. |
Returns
| Type | Description |
|---|---|
| MigrationServiceFactory | A service factory to use to get the service, or null to use the default service. |
GetServiceFactory<TService>()
Gets the service factory override for the given service type.
Declaration
MigrationServiceFactory? GetServiceFactory<TService>()
Returns
| Type | Description |
|---|---|
| MigrationServiceFactory | A service factory to use to get the service, or null to use the default service. |
Type Parameters
| Name | Description |
|---|---|
| TService | The service type. |
GetService<TService>(IServiceProvider)
Gets a service, either from a registered service factory override, or from the service provider as a fallback.
Declaration
TService GetService<TService>(IServiceProvider services) where TService : notnull
Parameters
| Type | Name | Description |
|---|---|---|
| IServiceProvider | services | The service provider. |
Returns
| Type | Description |
|---|---|
| TService | The service. |
Type Parameters
| Name | Description |
|---|---|
| TService | The service to get. |