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>
      
   
  
  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
  
  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
  
  
    View Source
  
  InsertItem(Int32, T)
  
  
  Declaration
  
    protected override void InsertItem(int index, T item)
   
  Parameters
  
    
      
        | Type | Name | Description | 
    
    
      
        | System.Int32 | index |  | 
      
        | T | item |  |