/// <summary> /// Create a new instance of the IdentityMap that has an /// iteration order of the order the objects were added /// to the Map. /// </summary> /// <returns>A new IdentityMap based on ListDictionary.</returns> public static IDictionary InstantiateSequenced(int size) { IHashCodeProvider ihcp = new IdentityHashCodeProvider(); IComparer comp = new IdentityComparer(); return(new IdentityMap(new SequencedHashMap(size, ihcp, comp))); }
/// <summary> /// Create a new instance of the IdentityMap that has an /// iteration order of the order the objects were added /// to the Map. /// </summary> /// <returns>A new IdentityMap based on ListDictionary.</returns> public static IDictionary InstantiateSequenced( int size ) { IHashCodeProvider ihcp = new IdentityHashCodeProvider(); IComparer comp = new IdentityComparer(); return new IdentityMap( new SequencedHashMap( size, ihcp, comp ) ); }
public override int GetHashCode() { return(IdentityHashCodeProvider.GetHashCode(entity)); }
public static int IdentityHashCode(object obj) { return(IdentityHashCodeProvider.IdentityHashCode(obj)); }