Class MigrationManifestContentTypePartition
Object representing a partition of the manifest entry collection for a specific content type.
Implements
Namespace: Tableau.Migration.Engine.Manifest
Assembly: Tableau.Migration.dll
Syntax
public class MigrationManifestContentTypePartition : IMigrationManifestContentTypePartitionEditor, IMigrationManifestContentTypePartition, IReadOnlyCollection<IMigrationManifestEntry>, IEnumerable<IMigrationManifestEntry>, IEnumerable, IEquatable<IMigrationManifestContentTypePartition>, IMigrationManifestEntryBuilder
Constructors
MigrationManifestContentTypePartition(Type, ISharedResourcesLocalizer, ILogger<MigrationManifestContentTypePartition>)
Creates a new MigrationManifestContentTypePartition object.
Declaration
public MigrationManifestContentTypePartition(Type type, ISharedResourcesLocalizer localizer, ILogger<MigrationManifestContentTypePartition> logger)
Parameters
Type | Name | Description |
---|---|---|
Type | type | The content type the partition holds manifest entries for. |
ISharedResourcesLocalizer | localizer | A localizer. |
ILogger<MigrationManifestContentTypePartition> | logger | A logger. |
Properties
ByDestinationId
Gets the manifest entries keyed by destination ID.
Declaration
public IReadOnlyDictionary<Guid, IMigrationManifestEntryEditor> ByDestinationId { get; }
Property Value
Type | Description |
---|---|
IReadOnlyDictionary<Guid, IMigrationManifestEntryEditor> |
ByMappedLocation
Gets the manifest entries keyed by mapped destination location.
Declaration
public IReadOnlyDictionary<ContentLocation, IMigrationManifestEntryEditor> ByMappedLocation { get; }
Property Value
Type | Description |
---|---|
IReadOnlyDictionary<ContentLocation, IMigrationManifestEntryEditor> |
BySourceContentUrl
Gets the manifest entries keyed by source content URL.
Declaration
public IReadOnlyDictionary<string, IMigrationManifestEntryEditor> BySourceContentUrl { get; }
Property Value
Type | Description |
---|---|
IReadOnlyDictionary<string, IMigrationManifestEntryEditor> |
BySourceId
Gets the manifest entries keyed by source ID.
Declaration
public IReadOnlyDictionary<Guid, IMigrationManifestEntryEditor> BySourceId { get; }
Property Value
Type | Description |
---|---|
IReadOnlyDictionary<Guid, IMigrationManifestEntryEditor> |
BySourceLocation
Gets the manifest entries keyed by source location.
Declaration
public IReadOnlyDictionary<ContentLocation, IMigrationManifestEntryEditor> BySourceLocation { get; }
Property Value
Type | Description |
---|---|
IReadOnlyDictionary<ContentLocation, IMigrationManifestEntryEditor> |
ContentType
Gets the content type the partition holds manifest entries for.
Declaration
public Type ContentType { get; }
Property Value
Type | Description |
---|---|
Type |
Count
Gets the number of elements in the collection.
Declaration
public int Count { get; }
Property Value
Type | Description |
---|---|
int |
ExpectedTotalCount
Gets the number of entries that are expected to be migrated for the partition's content type. This value is based on total count returned by the source, and may change as batches are migrated.
Declaration
public int ExpectedTotalCount { get; }
Property Value
Type | Description |
---|---|
int |
Methods
CreateEntries(IReadOnlyCollection<IMigrationManifestEntry>)
Creates entries from a set of entries to deep clone.
Declaration
public IMigrationManifestContentTypePartitionEditor CreateEntries(IReadOnlyCollection<IMigrationManifestEntry> entriesToCopy)
Parameters
Type | Name | Description |
---|---|---|
IReadOnlyCollection<IMigrationManifestEntry> | entriesToCopy | The entries to clone. |
Returns
Type | Description |
---|---|
IMigrationManifestContentTypePartitionEditor | The current partition, for fluent API usage. |
CreateEntries<TItem, TResultItem>(IReadOnlyCollection<TItem>, Func<TItem, IMigrationManifestEntryEditor, TResultItem>, int)
Creates or links manifest entries to a set of content items.
Declaration
public ImmutableArray<TResultItem> CreateEntries<TItem, TResultItem>(IReadOnlyCollection<TItem> sourceContentItems, Func<TItem, IMigrationManifestEntryEditor, TResultItem> resultFactory, int expectedTotalCount) where TItem : IContentReference
Parameters
Type | Name | Description |
---|---|---|
IReadOnlyCollection<TItem> | sourceContentItems | The source content items to create or link manifest entries for. |
Func<TItem, IMigrationManifestEntryEditor, TResultItem> | resultFactory | A factory function to produce result items for, useful for linking a created manifest entry with the source content item it is associated with. |
int | expectedTotalCount | The updated expected total entry count. This should reflect the total number of content items that will be processed, regardless of paging or filtering. |
Returns
Type | Description |
---|---|
ImmutableArray<TResultItem> | An immutable array of results returned by |
Type Parameters
Name | Description |
---|---|
TItem | The input content item type to use. |
TResultItem | The result item to return. |
DestinationInfoUpdated(IMigrationManifestEntryEditor, IContentReference?)
Registers a destination information update for an entry to update caches.
Declaration
public void DestinationInfoUpdated(IMigrationManifestEntryEditor entry, IContentReference? oldDestinationInfo)
Parameters
Type | Name | Description |
---|---|---|
IMigrationManifestEntryEditor | entry | The manifest entry that was updated. |
IContentReference | oldDestinationInfo | The old destination information. |
Equals(object?)
Determines whether the specified object is equal to the current object.
Declaration
public override bool Equals(object? other)
Parameters
Type | Name | Description |
---|---|---|
object | other |
Returns
Type | Description |
---|---|
bool | true if the specified object is equal to the current object; otherwise, false. |
Overrides
Equals(IMigrationManifestContentTypePartition?)
Indicates whether the current object is equal to another object of the same type.
Declaration
public bool Equals(IMigrationManifestContentTypePartition? other)
Parameters
Type | Name | Description |
---|---|---|
IMigrationManifestContentTypePartition | other | An object to compare with this object. |
Returns
Type | Description |
---|---|
bool | true if the current object is equal to the |
GetEntryBuilder(int)
Gets a IMigrationManifestEntryBuilder to use to create manifest entries.
Declaration
public IMigrationManifestEntryBuilder GetEntryBuilder(int totalItemCount)
Parameters
Type | Name | Description |
---|---|---|
int | totalItemCount | The total number of expected manifest entries that will possibly be created. |
Returns
Type | Description |
---|---|
IMigrationManifestEntryBuilder | The manifest entry builder. |
GetEnumerator()
Returns an enumerator that iterates through the collection.
Declaration
public IEnumerator<IMigrationManifestEntryEditor> GetEnumerator()
Returns
Type | Description |
---|---|
IEnumerator<IMigrationManifestEntryEditor> | An enumerator that can be used to iterate through the collection. |
GetHashCode()
Serves as the default hash function.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
int | A hash code for the current object. |
Overrides
GetStatusTotals()
Gets the total counts for all the manifest entries in the partition by status.
Declaration
public ImmutableDictionary<MigrationManifestEntryStatus, int> GetStatusTotals()
Returns
Type | Description |
---|---|
ImmutableDictionary<MigrationManifestEntryStatus, int> | The total count of entries by status. |
MapEntriesAsync<TItem>(IEnumerable<TItem>, IContentMappingRunner, CancellationToken)
Maps all existing manifest entries to their intended destination locations.
Declaration
public Task<IMigrationManifestEntryBuilder> MapEntriesAsync<TItem>(IEnumerable<TItem> sourceContentItems, IContentMappingRunner mapper, CancellationToken cancel) where TItem : IContentReference
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<TItem> | sourceContentItems | The content items to map. |
IContentMappingRunner | mapper | An object to use to map entries. Supplied as a parameter to avoid DI circular references at plan initialization time. |
CancellationToken | cancel | The cancellation token to obey. |
Returns
Type | Description |
---|---|
Task<IMigrationManifestEntryBuilder> | The current entry builder, for fluent API usage. |
Type Parameters
Name | Description |
---|---|
TItem | The input content item type. |
MigrationFailed(IMigrationManifestEntryEditor)
Declaration
public void MigrationFailed(IMigrationManifestEntryEditor entry)
Parameters
Type | Name | Description |
---|---|---|
IMigrationManifestEntryEditor | entry |
StatusUpdated(IMigrationManifestEntryEditor, MigrationManifestEntryStatus)
Registers a status change update for an entry to update totals.
Declaration
public void StatusUpdated(IMigrationManifestEntryEditor entry, MigrationManifestEntryStatus oldStatus)
Parameters
Type | Name | Description |
---|---|---|
IMigrationManifestEntryEditor | entry | The manifest entry that was updated. |
MigrationManifestEntryStatus | oldStatus | The old status. |
Operators
operator ==(MigrationManifestContentTypePartition?, MigrationManifestContentTypePartition?)
Declaration
public static bool operator ==(MigrationManifestContentTypePartition? a, MigrationManifestContentTypePartition? b)
Parameters
Type | Name | Description |
---|---|---|
MigrationManifestContentTypePartition | a | |
MigrationManifestContentTypePartition | b |
Returns
Type | Description |
---|---|
bool |
operator !=(MigrationManifestContentTypePartition?, MigrationManifestContentTypePartition?)
Declaration
public static bool operator !=(MigrationManifestContentTypePartition? a, MigrationManifestContentTypePartition? b)
Parameters
Type | Name | Description |
---|---|---|
MigrationManifestContentTypePartition | a | |
MigrationManifestContentTypePartition | b |
Returns
Type | Description |
---|---|
bool |