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