Class FavoriteMapping
Mapping that automatically maps favorites based on their respective user and content references.
Inherited Members
Namespace: Tableau.Migration.Engine.Hooks.Mappings.Default
Assembly: Tableau.Migration.dll
Syntax
public sealed class FavoriteMapping : ContentMappingBase<IFavorite>, IContentMapping<IFavorite>, IMigrationHook<ContentMappingContext<IFavorite>>
Constructors
FavoriteMapping(IMigrationManifestEditor, ISharedResourcesLocalizer, ILogger<IContentMapping<IFavorite>>)
Creates a new FavoriteMapping object.
Declaration
public FavoriteMapping(IMigrationManifestEditor manifest, ISharedResourcesLocalizer localizer, ILogger<IContentMapping<IFavorite>> logger)
Parameters
Type | Name | Description |
---|---|---|
IMigrationManifestEditor | manifest | The current migration manifest. |
ISharedResourcesLocalizer | localizer | The shared resource localizer. |
ILogger<IContentMapping<IFavorite>> | logger | The logger. |
Methods
MapAsync(ContentMappingContext<IFavorite>, CancellationToken)
Executes the mapping.
Declaration
public override Task<ContentMappingContext<IFavorite>?> MapAsync(ContentMappingContext<IFavorite> ctx, CancellationToken cancel)
Parameters
Type | Name | Description |
---|---|---|
ContentMappingContext<IFavorite> | ctx | The input context from the migration engine or previous hook. |
CancellationToken | cancel | The cancellation token to obey. |
Returns
Type | Description |
---|---|
Task<ContentMappingContext<IFavorite>> | 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 |