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. 
 | 
                  
                
              
              
              
              
              
                  
              
                     
              
                
                  |
                  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
              
              
              
              
              
              
              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()
              
              
              
              
              
              
              
              
              
              
              
              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
              
              
              
              
              
              
              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