Class CleanupViewsPostPublishHook
Workbook post-publish hook that cleans up views in destination that don't exist in source.
Inheritance
object
CleanupViewsPostPublishHook
Implements
Namespace: Tableau.Migration.Engine.Hooks.PostPublish.Default
Assembly: Tableau.Migration.dll
Syntax
public class CleanupViewsPostPublishHook : ContentItemPostPublishHookBase<IPublishableWorkbook, IWorkbookDetails>, IContentItemPostPublishHook<IPublishableWorkbook, IWorkbookDetails>, IMigrationHook<ContentItemPostPublishContext<IPublishableWorkbook, IWorkbookDetails>>
Constructors
CleanupViewsPostPublishHook(IMigration, ILogger<CleanupViewsPostPublishHook>, ISharedResourcesLocalizer)
Creates a new CleanupViewsPostPublishHook object.
Declaration
public CleanupViewsPostPublishHook(IMigration migration, ILogger<CleanupViewsPostPublishHook> logger, ISharedResourcesLocalizer localizer)
Parameters
| Type | Name | Description |
|---|---|---|
| IMigration | migration | The current migration. |
| ILogger<CleanupViewsPostPublishHook> | logger | The logger. |
| ISharedResourcesLocalizer | localizer | The shared resources localizer. |
Methods
ExecuteAsync(ContentItemPostPublishContext<IPublishableWorkbook, IWorkbookDetails>, CancellationToken)
Executes a hook callback.
Declaration
public override Task<ContentItemPostPublishContext<IPublishableWorkbook, IWorkbookDetails>?> ExecuteAsync(ContentItemPostPublishContext<IPublishableWorkbook, IWorkbookDetails> ctx, CancellationToken cancel)
Parameters
| Type | Name | Description |
|---|---|---|
| ContentItemPostPublishContext<IPublishableWorkbook, IWorkbookDetails> | ctx | The input context from the migration engine or previous hook. |
| CancellationToken | cancel | The cancellation token to obey. |
Returns
| Type | Description |
|---|---|
| Task<ContentItemPostPublishContext<IPublishableWorkbook, IWorkbookDetails>> | 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 |