Stride

OPEN / CLOSE
  • Features
  • Blog
  • Documentation
  • Community
(icon) Download

  • Discord
  • Facebook
  • Twitter
  • YouTube

LANGUAGE

OPEN / CLOSE
  • English
  • 日本語
    Show / Hide Table of Contents

    CollectionItemIdentifiers Class

    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.

    System.Object → CollectionItemIdentifiers
    Derived from CollectionItemIdentifiers:

    public class CollectionItemIdentifiers : IEnumerable<KeyValuePair<object, ItemId>>, IEnumerable
    Name Description
    Properties
    DeletedCount

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

    DeletedItems

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

    Item[Object]

    Gets or sets the ItemId corresponding to the given key.

    KeyCount

    Gets the number of keys/identifiers in this CollectionItemIdentifiers.

    Methods
    Add(Object, ItemId)
    Clear()
    CloneInto(CollectionItemIdentifiers, IReadOnlyDictionary<Object, Object>)
    ContainsKey(Object)
    Delete(Object, Boolean)
    DeleteAndShift(Int32, Boolean)
    GetEnumerator()
    GetKey(ItemId)
    Insert(Int32, ItemId)
    IsDeleted(ItemId)
    MarkAsDeleted(ItemId)
    Set(Object, ItemId)
    TryGet(Object, out ItemId)
    UnmarkAsDeleted(ItemId)
    Validate(Boolean)
    Explicit Interface Implementations
    IEnumerable.GetEnumerator()
    | Improve this Doc View Source

    Properties


    DeletedCount

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

    public int DeletedCount { get; }
    Property Value
    Type Description
    System.Int32

    DeletedItems

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

    public IEnumerable<ItemId> DeletedItems { get; }
    Property Value
    Type Description
    System.Collections.Generic.IEnumerable<ItemId>

    Item[Object]

    Gets or sets the ItemId corresponding to the given key.

    public ItemId this[object key] { get; set; }
    Parameters
    Type Name Description
    System.Object key

    The key for which to retrieve the ItemId.

    Property Value
    Type Description
    ItemId

    The ItemId corresponding to the given key.


    KeyCount

    Gets the number of keys/identifiers in this CollectionItemIdentifiers.

    public int KeyCount { get; }
    Property Value
    Type Description
    System.Int32
    | Improve this Doc View Source

    Methods


    Add(Object, ItemId)

    public void Add(object key, ItemId id)
    Parameters
    Type Name Description
    System.Object key
    ItemId id

    Clear()

    public void Clear()

    CloneInto(CollectionItemIdentifiers, IReadOnlyDictionary<Object, Object>)

    public void CloneInto(CollectionItemIdentifiers target, IReadOnlyDictionary<object, object> referenceTypeClonedKeys)
    Parameters
    Type Name Description
    CollectionItemIdentifiers target
    System.Collections.Generic.IReadOnlyDictionary<System.Object, System.Object> referenceTypeClonedKeys

    ContainsKey(Object)

    public bool ContainsKey(object key)
    Parameters
    Type Name Description
    System.Object key
    Returns
    Type Description
    System.Boolean

    Delete(Object, Boolean)

    public ItemId Delete(object key, bool markAsDeleted = true)
    Parameters
    Type Name Description
    System.Object key
    System.Boolean markAsDeleted
    Returns
    Type Description
    ItemId

    DeleteAndShift(Int32, Boolean)

    public ItemId DeleteAndShift(int index, bool markAsDeleted = true)
    Parameters
    Type Name Description
    System.Int32 index
    System.Boolean markAsDeleted
    Returns
    Type Description
    ItemId

    GetEnumerator()

    public IEnumerator<KeyValuePair<object, ItemId>> GetEnumerator()
    Returns
    Type Description
    System.Collections.Generic.IEnumerator<System.Collections.Generic.KeyValuePair<System.Object, ItemId>>

    GetKey(ItemId)

    public object GetKey(ItemId itemId)
    Parameters
    Type Name Description
    ItemId itemId
    Returns
    Type Description
    System.Object

    Insert(Int32, ItemId)

    public void Insert(int index, ItemId id)
    Parameters
    Type Name Description
    System.Int32 index
    ItemId id

    IsDeleted(ItemId)

    public bool IsDeleted(ItemId itemId)
    Parameters
    Type Name Description
    ItemId itemId
    Returns
    Type Description
    System.Boolean

    MarkAsDeleted(ItemId)

    public void MarkAsDeleted(ItemId id)
    Parameters
    Type Name Description
    ItemId id

    Set(Object, ItemId)

    public void Set(object key, ItemId id)
    Parameters
    Type Name Description
    System.Object key
    ItemId id

    TryGet(Object, out ItemId)

    public bool TryGet(object key, out ItemId id)
    Parameters
    Type Name Description
    System.Object key
    ItemId id
    Returns
    Type Description
    System.Boolean

    UnmarkAsDeleted(ItemId)

    public void UnmarkAsDeleted(ItemId id)
    Parameters
    Type Name Description
    ItemId id

    Validate(Boolean)

    public void Validate(bool isList)
    Parameters
    Type Name Description
    System.Boolean isList
    | Improve this Doc View Source

    Explicit Interface Implementations


    IEnumerable.GetEnumerator()

    IEnumerator IEnumerable.GetEnumerator()
    Returns
    Type Description
    System.Collections.IEnumerator

    Extension Methods

    ComponentBaseExtensions.DisposeBy<T>(T, ICollectorHolder)
    ComponentBaseExtensions.RemoveDisposeBy<T>(T, ICollectorHolder)
    EnumerableExtensions.IsNullOrEmpty(IEnumerable)
    EnumerableExtensions.ForEach<T>(IEnumerable, Action<T>)
    EnumerableExtensions.ForEach<T>(IEnumerable<T>, Action<T>)
    EnumerableExtensions.IndexOf<T>(IEnumerable<T>, Func<T, Boolean>)
    EnumerableExtensions.LastIndexOf<T>(IEnumerable<T>, Func<T, Boolean>)
    • Improve this Doc
    • View Source
    In This Article

    Back to top

    Copyright © 2019-2021 .NET Foundation and Contributors
    Supported by the .NET Foundation