Class ContentBatchMigratorBase<TContent, TPublish>
Abstract base class for IContentBatchMigrator<TContent> implementations.
Inheritance
ContentBatchMigratorBase<TContent, TPublish>
Implements
IContentBatchMigrator<TContent>
Namespace: Tableau.Migration.Engine.Migrators.Batch
Assembly: Tableau.Migration.dll
Syntax
public abstract class ContentBatchMigratorBase<TContent, TPublish> : IContentBatchMigrator<TContent> where TContent : class, IContentReference where TPublish : class
Type Parameters
Name | Description |
---|---|
TContent | The content type. |
TPublish | The publish type. |
Constructors
ContentBatchMigratorBase(IMigrationPipeline)
Creates a new ContentBatchMigratorBase<TContent, TPublish> object.
Declaration
public ContentBatchMigratorBase(IMigrationPipeline pipeline)
Parameters
Type | Name | Description |
---|---|---|
IMigrationPipeline | pipeline | The migration pipeline. |
Methods
MigrateAsync(ImmutableArray<ContentMigrationItem<TContent>>, CancellationToken)
Migrates a batch of content items.
Declaration
public Task<IContentBatchMigrationResult<TContent>> MigrateAsync(ImmutableArray<ContentMigrationItem<TContent>> itemBatch, CancellationToken migrationCancel)
Parameters
Type | Name | Description |
---|---|---|
ImmutableArray<ContentMigrationItem<TContent>> | itemBatch | The batch of content items to migrate. |
CancellationToken | migrationCancel |
Returns
Type | Description |
---|---|
Task<IContentBatchMigrationResult<TContent>> | The results of the batch migration. |
MigrateBatchAsync(ContentMigrationBatch<TContent, TPublish>)
Migrates the batch of content items.
Declaration
protected abstract Task MigrateBatchAsync(ContentMigrationBatch<TContent, TPublish> batch)
Parameters
Type | Name | Description |
---|---|---|
ContentMigrationBatch<TContent, TPublish> | batch | The batch to migrate. |
Returns
Type | Description |
---|---|
Task |
MigrateBatchItemAsync(ContentMigrationItem<TContent>, ContentMigrationBatch<TContent, TPublish>)
Migrates a single content item.
Declaration
protected virtual Task MigrateBatchItemAsync(ContentMigrationItem<TContent> item, ContentMigrationBatch<TContent, TPublish> batch)
Parameters
Type | Name | Description |
---|---|---|
ContentMigrationItem<TContent> | item | The item to migrate. |
ContentMigrationBatch<TContent, TPublish> | batch | The batch being migrated. |
Returns
Type | Description |
---|---|
Task | A task to await. |
MigratePreparedItemAsync(ContentMigrationItem<TContent>, TPublish, CancellationToken)
Performs post-preparation item migration (e.g. publishing, adding to a bulk import, etc.).
Declaration
protected abstract Task<IResult> MigratePreparedItemAsync(ContentMigrationItem<TContent> migrationItem, TPublish preparedItem, CancellationToken cancel)
Parameters
Type | Name | Description |
---|---|---|
ContentMigrationItem<TContent> | migrationItem | The item being migrated. |
TPublish | preparedItem | The prepared publish item. |
CancellationToken | cancel | The cancellation token to obey. |
Returns
Type | Description |
---|---|
Task<IResult> | The result of the migration. |