Example #1
0
 public int CompareTo(MemoryRepositoryId other)
 {
     if (other == null)
     {
         return(-1);
     }
     return(Comparer <int> .Default.Compare(id, other.id));
 }
Example #2
0
        public virtual T CreateItem()
        {
            T t = new T();
            MemoryRepositoryId id = new MemoryRepositoryId();

            idToObjectHashtable.Add(id, t);
            objectToIdHashtable.Add(t, id);
            return(t);
        }
Example #3
0
            public bool Equals(MemoryRepositoryId memoryRepositoryId)
            {
                if (memoryRepositoryId == null)
                {
                    return(false);
                }

                return(id == memoryRepositoryId.id);
            }