Class DestinationProjectCache
DestinationCache<TContent> implementation that tracks locked projects.
Inheritance
object
DestinationProjectCache
Inherited Members
Namespace: Tableau.Migration.Engine.Endpoints.Caching
Assembly: Tableau.Migration.dll
Syntax
public class DestinationProjectCache : DestinationCache<IProject>, IContentReferenceCache, ILockedProjectCache
Constructors
DestinationProjectCache(IMigrationPipeline, IDestinationEndpoint, IConfigReader, IMigrationManifestEditor, ILogger<DestinationProjectCache>)
Creates a new DestinationProjectCache object.
Declaration
public DestinationProjectCache(IMigrationPipeline pipeline, IDestinationEndpoint endpoint, IConfigReader configReader, IMigrationManifestEditor manifest, ILogger<DestinationProjectCache> logger)
Parameters
| Type | Name | Description |
|---|---|---|
| IMigrationPipeline | pipeline | |
| IDestinationEndpoint | endpoint | The destination endpoint. |
| IConfigReader | configReader | The configuration reader. |
| IMigrationManifestEditor | manifest | The migration manifest. |
| ILogger<DestinationProjectCache> | logger |
Methods
IsProjectLockedAsync(Guid, CancellationToken, bool)
Finds whether a project is locked.
Declaration
public Task<bool> IsProjectLockedAsync(Guid id, CancellationToken cancel, bool includeWithoutNested = true)
Parameters
| Type | Name | Description |
|---|---|---|
| Guid | id | The ID of the project. |
| CancellationToken | cancel | The cancellation token to obey. |
| bool | includeWithoutNested | Whether or not to consider LockedToProjectWithoutNested as locked. Except for narrow special cases this is true. |
Returns
| Type | Description |
|---|---|
| Task<bool> | True if the project is locked; false if the project is not locked or not found. |
ItemsLoadedAsync(IImmutableList<IProject>, CancellationToken)
Called after one or more items have been loaded into the cache from the store.
Declaration
protected override Task ItemsLoadedAsync(IImmutableList<IProject> items, CancellationToken cancel)
Parameters
| Type | Name | Description |
|---|---|---|
| IImmutableList<IProject> | items | The items that were loaded. |
| CancellationToken | cancel | The cancellation token to obey. |
Returns
| Type | Description |
|---|---|
| Task | A task to await. |
Overrides
UpdateLockedProjectCache(IProject)
Updates the locked project cache with the given project information.
Declaration
public void UpdateLockedProjectCache(IProject project)
Parameters
| Type | Name | Description |
|---|---|---|
| IProject | project | The project to update the cache for. |