Exemplo n.º 1
0
 public bool Equals(CollectionMoveEvent <T> other)
 {
     return(OldIndex.Equals(other.OldIndex) && NewIndex.Equals(other.NewIndex) && EqualityComparer <T> .Default.Equals(Value, other.Value));
 }
Exemplo n.º 2
0
 public override int GetHashCode()
 {
     return(OldIndex.GetHashCode() ^ NewIndex.GetHashCode() << 2 ^ EqualityComparer <T> .Default.GetHashCode(Value) >> 2);
 }
Exemplo n.º 3
0
 public bool Enq(RForm objectAdd)           //Enqueue
 {
     if (!IsFull)
     {
         try {
             arrobjects[NewIndex] = objectAdd;
             iCount_PlusFirstIsOneAfterLast++;
             //sLogLine="debug enq iCount_PlusFirstIsOneAfterLast="+iCount_PlusFirstIsOneAfterLast.ToRForm();
             return(true);
         }
         catch (Exception exn) {
             RReporting.ShowExn(exn, "accessing RFormq array", "RFormq Enq(" + RReporting.RFormMessage(objectAdd, false) + ") {enqueue-at:" + NewIndex.ToRForm() + "}");
         }
         return(false);
     }
     else
     {
         RReporting.ShowErr("RFormQ is full, can't enqueue", "RFormQ Enq(" + ((objectAdd == null)?"null RForm":"non-null") + ") {used:" + iCount_PlusFirstIsOneAfterLast.ToRForm() + "}");
         return(false);
     }
 }