Search Results for

    Show / Hide Table of Contents
    View Source

    Class OrderedHashSet<T>

    A custom collection similar to HashSet{T} which only contains unique items, however this collection keeps items in order and is customizable to keep the newest or oldest equatable item

    Inheritance
    System.Object
    System.Collections.ObjectModel.Collection<T>
    System.Collections.ObjectModel.KeyedCollection<T, T>
    Namespace: Umbraco.Cms.Core.Collections
    Assembly: Umbraco.Core.dll
    Syntax
    public class OrderedHashSet<T> : KeyedCollection<T, T>, IList<T>, ICollection<T>, IReadOnlyList<T>, IReadOnlyCollection<T>, IEnumerable<T>, IList, ICollection, IEnumerable
    Type Parameters
    Name Description
    T

    Constructors

    View Source

    OrderedHashSet(Boolean)

    Declaration
    public OrderedHashSet(bool keepOldest = true)
    Parameters
    Type Name Description
    System.Boolean keepOldest

    Methods

    View Source

    GetKeyForItem(T)

    Declaration
    protected override T GetKeyForItem(T item)
    Parameters
    Type Name Description
    T item
    Returns
    Type Description
    T
    View Source

    InsertItem(Int32, T)

    Declaration
    protected override void InsertItem(int index, T item)
    Parameters
    Type Name Description
    System.Int32 index
    T item
    • Improve this Doc
    • View Source
    In This Article
    • Constructors
      • OrderedHashSet(Boolean)
    • Methods
      • GetKeyForItem(T)
      • InsertItem(Int32, T)
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX