public int CompareTo(MemoryRepositoryId other) { if (other == null) { return(-1); } return(Comparer <int> .Default.Compare(id, other.id)); }
public virtual T CreateItem() { T t = new T(); MemoryRepositoryId id = new MemoryRepositoryId(); idToObjectHashtable.Add(id, t); objectToIdHashtable.Add(t, id); return(t); }
public bool Equals(MemoryRepositoryId memoryRepositoryId) { if (memoryRepositoryId == null) { return(false); } return(id == memoryRepositoryId.id); }