예제 #1
0
파일: Sets.cs 프로젝트: olgatei/MSPC
 public void AddOrUpdate(ProcessedPeak <I> processedPeak)
 {
     if (_peaks.TryGetValue(processedPeak.Source.GetHashCode(), out ProcessedPeak <I> oldValue))
     {
         if (_replicateType == ReplicateType.Biological)
         {
             if ((oldValue.Classification.Contains(Attributes.Discarded) && processedPeak.Classification.Contains(Attributes.Confirmed)) ||
                 (!oldValue.Classification.Contains(Attributes.Confirmed) && !oldValue.Classification.Contains(Attributes.Discarded)))
             {
                 _peaks[processedPeak.Source.GetHashCode()] = processedPeak;
             }
         }
         else
         {
             if (oldValue.Classification.Contains(Attributes.Confirmed) && processedPeak.Classification.Contains(Attributes.Discarded) ||
                 (!oldValue.Classification.Contains(Attributes.Confirmed) && !oldValue.Classification.Contains(Attributes.Discarded)))
             {
                 _peaks[processedPeak.Source.GetHashCode()] = processedPeak;
             }
         }
     }
     else
     {
         _peaks.Add(processedPeak.Source.GetHashCode(), processedPeak);
     }
 }
예제 #2
0
 public int CompareTo(ProcessedPeak <I> other)
 {
     if (other == null)
     {
         return(1);
     }
     return(base.CompareTo(other));
 }