Class AsyncContentFilterBase<TContent>
Base implementation for an object that can filter content of a specific content type, to determine which content to migrate.
Inherited Members
Namespace: Tableau.Migration.Engine.Hooks.Filters
Assembly: Tableau.Migration.dll
Syntax
public abstract class AsyncContentFilterBase<TContent> : RootContentFilterBase<TContent>, IContentFilter<TContent>, IMigrationHook<IEnumerable<ContentMigrationItem<TContent>>> where TContent : IContentReference
Type Parameters
Name | Description |
---|---|
TContent |
Constructors
AsyncContentFilterBase(ISharedResourcesLocalizer?, ILogger<IContentFilter<TContent>>?)
Creates a new AsyncContentFilterBase<TContent> object.
Declaration
public AsyncContentFilterBase(ISharedResourcesLocalizer? localizer, ILogger<IContentFilter<TContent>>? logger)
Parameters
Type | Name | Description |
---|---|---|
ISharedResourcesLocalizer | localizer | The string localizer.The logger. |
ILogger<IContentFilter<TContent>> | logger | The string localizer.The logger. |
Methods
ExecuteAsync(IEnumerable<ContentMigrationItem<TContent>>, CancellationToken)
Executes a hook callback.
Declaration
public override Task<IEnumerable<ContentMigrationItem<TContent>>?> ExecuteAsync(IEnumerable<ContentMigrationItem<TContent>> ctx, CancellationToken cancel)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<ContentMigrationItem<TContent>> | ctx | The input context from the migration engine or previous hook. |
CancellationToken | cancel | The cancellation token to obey. |
Returns
Type | Description |
---|---|
Task<IEnumerable<ContentMigrationItem<TContent>>> | A task to await containing the context,
potentially modified to pass on to the next hook or migration engine,
or null to continue passing the same context as |
Overrides
ShouldMigrateAsync(ContentMigrationItem<TContent>, CancellationToken)
Checks if the item should be migrated.
Declaration
public abstract Task<bool> ShouldMigrateAsync(ContentMigrationItem<TContent> item, CancellationToken cancel)
Parameters
Type | Name | Description |
---|---|---|
ContentMigrationItem<TContent> | item | The item to evaluate. |
CancellationToken | cancel | The cancellation token to obey. |
Returns
Type | Description |
---|---|
Task<bool> | True if the item should be migrated. |