Interface IContentTransformerBuilder
Interface with methods to build IContentTransformer<TPublish>.
Inherited Members
Namespace: Tableau.Migration.Engine.Hooks.Transformers
Assembly: Tableau.Migration.dll
Syntax
public interface IContentTransformerBuilder : IContentTypeHookBuilder
Methods
Add(Type, IEnumerable<Type[]>)
Adds a factory to resolve the transformer type.
Declaration
IContentTransformerBuilder Add(Type genericTransformerType, IEnumerable<Type[]> contentTypes)
Parameters
Type | Name | Description |
---|---|---|
Type | genericTransformerType | The generic type definition for the transformer to execute. |
IEnumerable<Type[]> | contentTypes | The content types used to construct the transformer types. |
Returns
Type | Description |
---|---|
IContentTransformerBuilder | The same transformer builder object for fluent API calls. |
Add<TPublish>(Func<TPublish, CancellationToken, Task<TPublish?>>)
Adds a callback to be executed on the transformer for the content type.
Declaration
IContentTransformerBuilder Add<TPublish>(Func<TPublish, CancellationToken, Task<TPublish?>> callback)
Parameters
Type | Name | Description |
---|---|---|
Func<TPublish, CancellationToken, Task<TPublish>> | callback | A callback to call for the transformer. |
Returns
Type | Description |
---|---|
IContentTransformerBuilder | The same transformer builder object for fluent API calls. |
Type Parameters
Name | Description |
---|---|
TPublish | The publishable content type. |
Add<TPublish>(Func<TPublish, TPublish?>)
Adds a callback to be executed on the transformer for the content type.
Declaration
IContentTransformerBuilder Add<TPublish>(Func<TPublish, TPublish?> callback)
Parameters
Type | Name | Description |
---|---|---|
Func<TPublish, TPublish> | callback | A synchronously callback to call for the transformer. |
Returns
Type | Description |
---|---|
IContentTransformerBuilder | The same transformer builder object for fluent API calls. |
Type Parameters
Name | Description |
---|---|
TPublish | The publishable content type. |
Add<TPublish>(IContentTransformer<TPublish>)
Adds an object to be resolved when you build a transformer for the content type.
Declaration
IContentTransformerBuilder Add<TPublish>(IContentTransformer<TPublish> transformer)
Parameters
Type | Name | Description |
---|---|---|
IContentTransformer<TPublish> | transformer | The transformer to execute. |
Returns
Type | Description |
---|---|
IContentTransformerBuilder | The same transformer builder object for fluent API calls. |
Type Parameters
Name | Description |
---|---|
TPublish | The publishable content type. |
Add<TTransformer, TPublish>(Func<IServiceProvider, TTransformer>?)
Adds a factory to resolve the transformer type.
Declaration
IContentTransformerBuilder Add<TTransformer, TPublish>(Func<IServiceProvider, TTransformer>? transformerFactory = null) where TTransformer : IContentTransformer<TPublish>
Parameters
Type | Name | Description |
---|---|---|
Func<IServiceProvider, TTransformer> | transformerFactory | An initializer function to create the object from, potentially from the migration-scoped dependency injection container. |
Returns
Type | Description |
---|---|
IContentTransformerBuilder | The same transformer builder object for fluent API calls. |
Type Parameters
Name | Description |
---|---|
TTransformer | The transformer type. |
TPublish | The publishable content type. |
Build()
Builds an immutable collection from the currently added transformers.
Declaration
IMigrationHookFactoryCollection Build()
Returns
Type | Description |
---|---|
IMigrationHookFactoryCollection | The created collection. |
Clear()
Removes all currently registered transformers.
Declaration
IContentTransformerBuilder Clear()
Returns
Type | Description |
---|---|
IContentTransformerBuilder | The same transformers builder object for fluent API calls. |