Table of Contents

Class CollectionItemIdentifiers

Namespace
Stride.Core.Reflection
Assembly
Stride.Core.Assets.dll

A container for item identifiers and similar metadata that is associated to a collection or a dictionary.

public class CollectionItemIdentifiers : IEnumerable<KeyValuePair<object, ItemId>>, IEnumerable
Inheritance
CollectionItemIdentifiers
Implements
Extension Methods

Properties

DeletedCount

Gets the number of deleted identifiers that are being kept in this CollectionItemIdentifiers.

public int DeletedCount { get; }

Property Value

int

DeletedItems

Gets the list of ItemId corresponding to deleted items that are being kept in this CollectionItemIdentifiers.

public IEnumerable<ItemId> DeletedItems { get; }

Property Value

IEnumerable<ItemId>

this[object]

Gets or sets the ItemId corresponding to the given key.

public ItemId this[object key] { get; set; }

Parameters

key object

The key for which to retrieve the ItemId.

Property Value

ItemId

The ItemId corresponding to the given key.

KeyCount

Gets the number of keys/identifiers in this CollectionItemIdentifiers.

public int KeyCount { get; }

Property Value

int

Methods

Add(object, ItemId)

public void Add(object key, ItemId id)

Parameters

key object
id ItemId

Clear()

public void Clear()

CloneInto(CollectionItemIdentifiers, IReadOnlyDictionary<object, object>)

public void CloneInto(CollectionItemIdentifiers target, IReadOnlyDictionary<object, object> referenceTypeClonedKeys)

Parameters

target CollectionItemIdentifiers
referenceTypeClonedKeys IReadOnlyDictionary<object, object>

ContainsKey(object)

public bool ContainsKey(object key)

Parameters

key object

Returns

bool

Delete(object, bool)

public ItemId Delete(object key, bool markAsDeleted = true)

Parameters

key object
markAsDeleted bool

Returns

ItemId

DeleteAndShift(int, bool)

public ItemId DeleteAndShift(int index, bool markAsDeleted = true)

Parameters

index int
markAsDeleted bool

Returns

ItemId

GetEnumerator()

Returns an enumerator that iterates through the collection.

public IEnumerator<KeyValuePair<object, ItemId>> GetEnumerator()

Returns

IEnumerator<KeyValuePair<object, ItemId>>

An enumerator that can be used to iterate through the collection.

GetKey(ItemId)

public object GetKey(ItemId itemId)

Parameters

itemId ItemId

Returns

object

Insert(int, ItemId)

public void Insert(int index, ItemId id)

Parameters

index int
id ItemId

IsDeleted(ItemId)

public bool IsDeleted(ItemId itemId)

Parameters

itemId ItemId

Returns

bool

MarkAsDeleted(ItemId)

public void MarkAsDeleted(ItemId id)

Parameters

id ItemId

Set(object, ItemId)

public void Set(object key, ItemId id)

Parameters

key object
id ItemId

TryGet(object, out ItemId)

public bool TryGet(object key, out ItemId id)

Parameters

key object
id ItemId

Returns

bool

UnmarkAsDeleted(ItemId)

public void UnmarkAsDeleted(ItemId id)

Parameters

id ItemId

Validate(bool)

public void Validate(bool isList)

Parameters

isList bool