Stride

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

  • Discord
  • Facebook
  • Twitter
  • YouTube

LANGUAGE

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

    IndexingDictionary<T> Class

    Namespace: Stride.Core.Collections
    Assembly: Stride.Core.dll

    A dictionary that maps index values to items. It uses a sparse list internally for storage.

    System.Object → IndexingDictionary<T>
    Derived from IndexingDictionary<T>:

    [DataSerializer(typeof(IndexingDictionarySerializer<>), Mode = DataSerializerGenericMode.GenericArguments)]
    public class IndexingDictionary<T> : IDictionary<int, T>, ICollection<KeyValuePair<int, T>>, IEnumerable<KeyValuePair<int, T>>, IEnumerable where T : class
    Type Parameters
    Name Description
    T

    The type of item indexed in this collection.

    Name Description
    Properties
    Count
    IsReadOnly
    Item[Int32]
    Keys
    Values
    Methods
    Add(KeyValuePair<Int32, T>)
    Add(Int32, T)
    Clear()
    Contains(KeyValuePair<Int32, T>)
    ContainsKey(Int32)
    CopyTo(KeyValuePair<Int32, T>[], Int32)
    GetEnumerator()
    Remove(KeyValuePair<Int32, T>)
    Remove(Int32)
    SafeGet(Int32)
    TryGetValue(Int32, out T)
    Explicit Interface Implementations
    IEnumerable.GetEnumerator()
    | Improve this Doc View Source

    Properties


    Count

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

    IsReadOnly

    public bool IsReadOnly { get; }
    Property Value
    Type Description
    System.Boolean

    Item[Int32]

    public T this[int index] { get; set; }
    Parameters
    Type Name Description
    System.Int32 index
    Property Value
    Type Description
    T

    Keys

    public ICollection<int> Keys { get; }
    Property Value
    Type Description
    System.Collections.Generic.ICollection<System.Int32>

    Values

    public ICollection<T> Values { get; }
    Property Value
    Type Description
    System.Collections.Generic.ICollection<T>
    | Improve this Doc View Source

    Methods


    Add(KeyValuePair<Int32, T>)

    public void Add(KeyValuePair<int, T> item)
    Parameters
    Type Name Description
    System.Collections.Generic.KeyValuePair<System.Int32, T> item

    Add(Int32, T)

    public void Add(int key, T value)
    Parameters
    Type Name Description
    System.Int32 key
    T value

    Clear()

    public void Clear()

    Contains(KeyValuePair<Int32, T>)

    public bool Contains(KeyValuePair<int, T> item)
    Parameters
    Type Name Description
    System.Collections.Generic.KeyValuePair<System.Int32, T> item
    Returns
    Type Description
    System.Boolean

    ContainsKey(Int32)

    public bool ContainsKey(int index)
    Parameters
    Type Name Description
    System.Int32 index
    Returns
    Type Description
    System.Boolean

    CopyTo(KeyValuePair<Int32, T>[], Int32)

    public void CopyTo(KeyValuePair<int, T>[] array, int arrayIndex)
    Parameters
    Type Name Description
    System.Collections.Generic.KeyValuePair<System.Int32, T>[] array
    System.Int32 arrayIndex

    GetEnumerator()

    public IEnumerator<KeyValuePair<int, T>> GetEnumerator()
    Returns
    Type Description
    System.Collections.Generic.IEnumerator<System.Collections.Generic.KeyValuePair<System.Int32, T>>

    Remove(KeyValuePair<Int32, T>)

    public bool Remove(KeyValuePair<int, T> item)
    Parameters
    Type Name Description
    System.Collections.Generic.KeyValuePair<System.Int32, T> item
    Returns
    Type Description
    System.Boolean

    Remove(Int32)

    public bool Remove(int index)
    Parameters
    Type Name Description
    System.Int32 index
    Returns
    Type Description
    System.Boolean

    SafeGet(Int32)

    public T SafeGet(int index)
    Parameters
    Type Name Description
    System.Int32 index
    Returns
    Type Description
    T

    TryGetValue(Int32, out T)

    public bool TryGetValue(int key, out T value)
    Parameters
    Type Name Description
    System.Int32 key
    T value
    Returns
    Type Description
    System.Boolean
    | 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)
    ArrayExtensions.ComputeHash<T>(ICollection<T>, IEqualityComparer<T>)
    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