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<ContentFilterContext<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(ContentFilterContext<TContent>, CancellationToken)
Executes a hook callback.
Declaration
public override Task<ContentFilterContext<TContent>?> ExecuteAsync(ContentFilterContext<TContent> ctx, CancellationToken cancel)
Parameters
| Type | Name | Description |
|---|---|---|
| ContentFilterContext<TContent> | ctx | The input context from the migration engine or previous hook. |
| CancellationToken | cancel | The cancellation token to obey. |
Returns
| Type | Description |
|---|---|
| Task<ContentFilterContext<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
FilterAsync(ContentFilterContextItem<TContent>, CancellationToken)
Considers the content item for filtering.
Declaration
public virtual Task FilterAsync(ContentFilterContextItem<TContent> item, CancellationToken cancel)
Parameters
| Type | Name | Description |
|---|---|---|
| ContentFilterContextItem<TContent> | item | The item to potentially filter. |
| CancellationToken | cancel | The cancellation token to obey. |
Returns
| Type | Description |
|---|---|
| Task | The task to await. |
ShouldMigrateAsync(ContentMigrationItem<TContent>, CancellationToken)
Checks if the item should be migrated.
Declaration
public virtual 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. |