コード例 #1
0
        // Default comparator
        public int CompareTo(Message other)
        {
            //If two sequence numbers are the same
            if (SequenceNumber == other.SequenceNumber)
            {
                // Undeliverble message is smaller
                if (Deliverable && !other.Deliverable)
                {
                    return(1);
                }

                // Smaller process id
                return(ProcessID.CompareTo(other.ProcessID));
            }

            // Msg with smaller sequence number is smaller
            return(SequenceNumber.CompareTo(other.SequenceNumber));
        }
コード例 #2
0
ファイル: CapClrStats.cs プロジェクト: Mattlk13/perfview-1
 public int CompareTo(JitCapProcess other)
 {
     return(ProcessID.CompareTo(other.ProcessID));
 }