Class MigrationHookFactory
Default IMigrationHookFactory implementation that uses an initializer function.
Inheritance
object
MigrationHookFactory
Namespace: Tableau.Migration.Engine.Hooks
Assembly: Tableau.Migration.dll
Syntax
public record MigrationHookFactory : IMigrationHookFactory, IEquatable<MigrationHookFactory>
Constructors
MigrationHookFactory(Func<IServiceProvider, object>)
Default IMigrationHookFactory implementation that uses an initializer function.
Declaration
public MigrationHookFactory(Func<IServiceProvider, object> Factory)
Parameters
| Type | Name | Description |
|---|---|---|
| Func<IServiceProvider, object> | Factory | The initializer function. |
Properties
Factory
The initializer function.
Declaration
public Func<IServiceProvider, object> Factory { get; init; }
Property Value
| Type | Description |
|---|---|
| Func<IServiceProvider, object> |
Methods
Create<THook>(IServiceProvider)
Creates a hook for the given hook type.
Declaration
public THook Create<THook>(IServiceProvider services)
Parameters
| Type | Name | Description |
|---|---|---|
| IServiceProvider | services | The migration-scoped DI services available. |
Returns
| Type | Description |
|---|---|
| THook | The created hook. |
Type Parameters
| Name | Description |
|---|---|
| THook | The hook type. |
Exceptions
| Type | Condition |
|---|---|
| InvalidCastException | If the factory cannot create a hook of the hook type. |