WinForms

Code Examples Upgrade Guide User Guide Demos Support Forums Download
  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class TypedDictionaryBase

    Show / Hide Table of Contents

    Class TypedDictionaryBase

    Provides the abstract base class for a strongly typed collection of key-and-value pairs.

    Inheritance
    System.Object
    TypedDictionaryBase
    GridIndexDictionary
    Implements
    System.Collections.IDictionary
    System.Collections.ICollection
    System.Collections.IEnumerable
    Inherited Members
    System.Object.ToString()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace: Syncfusion.Collections
    Assembly: Syncfusion.Shared.Base.dll
    Syntax
    public abstract class TypedDictionaryBase : IDictionary, ICollection, IEnumerable
    Remarks

    This class is very similar to the System.Collections.DictionaryBase class. The main difference is that this version allows you to set the InnerHashtable. System.Collections.DictionaryBase only provides a Read-only property for the InnerHashtable.

    Constructors

    TypedDictionaryBase()

    Initializes a new TypedDictionaryBase.

    Declaration
    protected TypedDictionaryBase()

    TypedDictionaryBase(Hashtable)

    Initializes a new TypedDictionaryBase and associates it with a System.Collections.Hashtable.

    Declaration
    protected TypedDictionaryBase(Hashtable hashtable)
    Parameters
    Type Name Description
    System.Collections.Hashtable hashtable

    The inner collection that will hold entries of this collection.

    Properties

    Count

    Removes the number of elements contained in the TypedDictionaryBase instance.

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

    Dictionary

    Removes the list of elements contained in the TypedDictionaryBase instance.

    Declaration
    public IDictionary Dictionary { get; }
    Property Value
    Type Description
    System.Collections.IDictionary

    InnerHashtable

    Gets / sets the list of elements contained in the TypedDictionaryBase instance.

    Declaration
    protected virtual Hashtable InnerHashtable { get; set; }
    Property Value
    Type Description
    System.Collections.Hashtable

    IsFixedSize

    Indicates whether the TypedDictionaryBase has a fixed size.

    Declaration
    public virtual bool IsFixedSize { get; }
    Property Value
    Type Description
    System.Boolean

    IsReadOnly

    Indicates whether the TypedDictionaryBase is Read-only.

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

    IsSynchronized

    Indicates whether access to the TypedDictionaryBase is synchronized (thread-safe).

    Declaration
    public virtual bool IsSynchronized { get; }
    Property Value
    Type Description
    System.Boolean

    Keys

    Returns the list of keys contained in the TypedDictionaryBase instance.

    Declaration
    public ICollection Keys { get; }
    Property Value
    Type Description
    System.Collections.ICollection

    SyncRoot

    Gets an object that can be used to synchronize access to the TypedDictionaryBase.

    Declaration
    public virtual object SyncRoot { get; }
    Property Value
    Type Description
    System.Object

    Values

    Returns the list of values contained in the TypedDictionaryBase instance.

    Declaration
    public ICollection Values { get; }
    Property Value
    Type Description
    System.Collections.ICollection

    Methods

    Clear()

    Clears the contents of the TypedDictionaryBase instance.

    Declaration
    public void Clear()

    CopyTo(Array, Int32)

    Copies the TypedDictionaryBase elements to a one-dimensional System.Array at the specified index.

    Declaration
    public void CopyTo(Array array, int index)
    Parameters
    Type Name Description
    System.Array array

    The one-dimensional System.Array that is the destination of the System.Collections.DictionaryEntry objects copied from the TypedDictionaryBase instance. The System.Array must have zero-based indexing.

    System.Int32 index

    The zero-based index in an array at which copying begins.

    GetEnumerator()

    Returns a System.Collections.IDictionaryEnumerator that can iterate through the TypedDictionaryBase instance.

    Declaration
    public IDictionaryEnumerator GetEnumerator()
    Returns
    Type Description
    System.Collections.IDictionaryEnumerator

    A System.Collections.IDictionaryEnumerator for the TypedDictionaryBase instance.

    OnClear()

    Performs additional custom processes before clearing the contents of the TypedDictionaryBase instance.

    Declaration
    protected virtual void OnClear()

    OnGet(Object, Object)

    Returns the element with the specified key and value in the TypedDictionaryBase instance.

    Declaration
    protected virtual object OnGet(object key, object currentValue)
    Parameters
    Type Name Description
    System.Object key

    The key of the element to get.

    System.Object currentValue

    The current value of the element associated with key.

    Returns
    Type Description
    System.Object

    A System.Object containing the element with the specified key and value.

    OnInsert(Object, Object)

    Performs additional custom processes before inserting a new element into the TypedDictionaryBase instance.

    Declaration
    protected virtual void OnInsert(object key, object value)
    Parameters
    Type Name Description
    System.Object key

    The key of the element to insert.

    System.Object value

    The value of the element to insert.

    OnRemove(Object, Object)

    Performs additional custom processes before removing an element from the TypedDictionaryBase instance.

    Declaration
    protected virtual void OnRemove(object key, object value)
    Parameters
    Type Name Description
    System.Object key

    The key of the element to remove.

    System.Object value

    The value of the element to remove.

    OnSet(Object, Object, Object)

    Performs additional custom processes before setting a value in the TypedDictionaryBase instance.

    Declaration
    protected virtual void OnSet(object key, object oldValue, object newValue)
    Parameters
    Type Name Description
    System.Object key

    The key of the element to locate.

    System.Object oldValue

    The old value of the element associated with key.

    System.Object newValue

    The new value of the element associated with key.

    OnValidate(Object, Object)

    Performs additional custom processes when validating the element with the specified key and value.

    Declaration
    protected virtual void OnValidate(object key, object value)
    Parameters
    Type Name Description
    System.Object key

    The key of the element to validate.

    System.Object value

    The value of the element to validate.

    Explicit Interface Implementations

    IDictionary.Add(Object, Object)

    Adds the element with the specified key and value to the TypedDictionaryBase instance.

    Declaration
    void IDictionary.Add(object key, object value)
    Parameters
    Type Name Description
    System.Object key
    System.Object value

    IDictionary.Contains(Object)

    Declaration
    bool IDictionary.Contains(object key)
    Parameters
    Type Name Description
    System.Object key
    Returns
    Type Description
    System.Boolean

    IDictionary.get_Item(Object)

    Declaration
    object IDictionary.get_Item(object key)
    Parameters
    Type Name Description
    System.Object key
    Returns
    Type Description
    System.Object

    IDictionary.Item[Object]

    Declaration
    object IDictionary.this[] { get; set; }
    Parameters
    Type Name Description
    System.Object key
    Returns
    Type Description
    System.Object

    IDictionary.Remove(Object)

    Declaration
    void IDictionary.Remove(object key)
    Parameters
    Type Name Description
    System.Object key

    IDictionary.set_Item(Object, Object)

    Declaration
    void IDictionary.set_Item(object key, object value)
    Parameters
    Type Name Description
    System.Object key
    System.Object value

    IEnumerable.GetEnumerator()

    Returns the enumerator.

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

    Enumerator.

    Implements

    System.Collections.IDictionary
    System.Collections.ICollection
    System.Collections.IEnumerable

    Extension Methods

    EnumerableExtensions.GetElementType(IEnumerable)
    EnumerableExtensions.GetItemPropertyInfo(IEnumerable)
    FunctionalExtensions.ForEach<T>(IEnumerable, Action<T>)
    FunctionalExtensions.ToList<T>(IEnumerable)
    QueryableExtensions.OfQueryable(IEnumerable)
    QueryableExtensions.OfQueryable(IEnumerable, Type)
    QueryableExtensions.GroupByMany<TElement>(IEnumerable, Type, List<Func<TElement, Object>>)
    QueryableExtensions.GroupByMany(IEnumerable, Type, Func<String, Expression>, String[])
    QueryableExtensions.GroupByMany(IEnumerable, Type, List<SortDescriptor>, Dictionary<String, IComparer<Object>>, Func<String, Expression>, String[])
    QueryableExtensions.GroupByMany(IEnumerable, Type, List<SortDescriptor>, Func<String, Expression>, String[])
    Back to top Generated by DocFX
    Copyright © 2001 - 2023 Syncfusion Inc. All Rights Reserved