Class ContentItemPreparerBase<TContent, TPrepare, 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, TPrepare, TPublish> : IContentItemPreparer<TContent, TPublish> where TPrepare : class where TPublish : class
Type Parameters
| Name | Description |
|---|---|
| TContent | The content type. |
| TPrepare | The pull return type. |
| TPublish | The publish type. |
Constructors
ContentItemPreparerBase(IMigrationPipeline, IContentTransformerRunner, IDestinationContentReferenceFinderFactory, ISharedResourcesLocalizer)
Creates a new ContentItemPreparerBase<TContent, TPrepare, TPublish> object.
Declaration
public ContentItemPreparerBase(IMigrationPipeline pipeline, IContentTransformerRunner transformerRunner, IDestinationContentReferenceFinderFactory destinationFinderFactory, ISharedResourcesLocalizer localizer)
Parameters
| Type | Name | Description |
|---|---|---|
| IMigrationPipeline | pipeline | The migration pipeline. |
| IContentTransformerRunner | transformerRunner | A transformer runner. |
| IDestinationContentReferenceFinderFactory | destinationFinderFactory | The destination finder factory. |
| ISharedResourcesLocalizer | localizer | A localizer. |
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 a content item for conversion and/or publishing.
Declaration
protected abstract Task<IResult<TPrepare>> 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<TPrepare>> | The item to use for conversion and/or 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. |