Class ContentItemPreparerBase<TContent, TPublish>
Abstract base class for IContentItemPreparer<TContent, TPublish> implementations that defines standard features.
Inheritance
Implements
Namespace: Tableau.Migration.Engine.Preparation
Assembly: Tableau.Migration.dll
Syntax
public abstract class ContentItemPreparerBase<TContent, TPublish> : IContentItemPreparer<TContent, TPublish> where TPublish : class
Type Parameters
Name | Description |
---|---|
TContent | The content type. |
TPublish | The publish type. |
Constructors
ContentItemPreparerBase(IContentTransformerRunner, IDestinationContentReferenceFinderFactory)
Creates a new ContentItemPreparerBase<TContent, TPublish> object.
Declaration
public ContentItemPreparerBase(IContentTransformerRunner transformerRunner, IDestinationContentReferenceFinderFactory destinationFinderFactory)
Parameters
Type | Name | Description |
---|---|---|
IContentTransformerRunner | transformerRunner | A transformer runner. |
IDestinationContentReferenceFinderFactory | destinationFinderFactory | The destination finder factory. |
Methods
ApplyMappingAsync(TPublish, ContentLocation, CancellationToken)
Applies the mapped destination location to the item to publish.
Declaration
protected virtual Task ApplyMappingAsync(TPublish publishItem, ContentLocation mappedLocation, CancellationToken cancel)
Parameters
Type | Name | Description |
---|---|---|
TPublish | publishItem | The item to publish. |
ContentLocation | mappedLocation | The mapped destination location. |
CancellationToken | cancel | The cancellation token to obey. |
Returns
Type | Description |
---|---|
Task | The result of the mapping application. |
FinalizeAsync(TPublish, CancellationToken)
Performs finalization tasks that occur after transformers, but before publishing.
Declaration
protected virtual Task FinalizeAsync(TPublish publishItem, CancellationToken cancel)
Parameters
Type | Name | Description |
---|---|---|
TPublish | publishItem | The item to publish. |
CancellationToken | cancel | The cancellation token to obey. |
Returns
Type | Description |
---|---|
Task | A task to await. |
PrepareAsync(ContentMigrationItem<TContent>, CancellationToken)
Prepares a content item for publishing.
Declaration
public Task<IResult<TPublish>> PrepareAsync(ContentMigrationItem<TContent> item, CancellationToken cancel)
Parameters
Type | Name | Description |
---|---|---|
ContentMigrationItem<TContent> | item | The item to prepare. |
CancellationToken | cancel | A cancellation token to obye. |
Returns
Type | Description |
---|---|
Task<IResult<TPublish>> | The preparation result. |
PullAsync(ContentMigrationItem<TContent>, CancellationToken)
Pulls any additional information needed to prepare/publish a content item.
Declaration
protected abstract Task<IResult<TPublish>> PullAsync(ContentMigrationItem<TContent> item, CancellationToken cancel)
Parameters
Type | Name | Description |
---|---|---|
ContentMigrationItem<TContent> | item | The content item to use to pull additional information. |
CancellationToken | cancel | The cancellation token to obey. |
Returns
Type | Description |
---|---|
Task<IResult<TPublish>> | The item to use for publishing. |
TransformAsync(TPublish, CancellationToken)
Performs pre-publishing modifications on a publish item.
Declaration
protected virtual Task<IResult<TPublish>> TransformAsync(TPublish publishItem, CancellationToken cancel)
Parameters
Type | Name | Description |
---|---|---|
TPublish | publishItem | The item intended for publishing to prepare. |
CancellationToken | cancel | The cancellation token to obey. |
Returns
Type | Description |
---|---|
Task<IResult<TPublish>> | The item to use for publishing. |