示例#1
0
 private static void MergeMod(ExplicitMod explicitMod, IEnumerable<StaticMod> docMods,
     ICollection<ExplicitMod> explicitMods)
 {
     if (docMods.Contains(explicitMod.Modification))
         explicitMods.Add(explicitMod);
 }
示例#2
0
 private static IList<ExplicitMod> GetRearrangedMods(IEnumerable<ExplicitMod> mods, int lenSeq,
     Func<int, int> getNewIndex)
 {
     if (null == mods)
     {
         return null;
     }
     var arrayMods = mods.ToArray();
     for (int i = 0; i < arrayMods.Length; i++)
     {
         var mod = arrayMods[i];
         if (mod.IndexAA < lenSeq)
             arrayMods[i] = new ExplicitMod(getNewIndex(mod.IndexAA), mod.Modification);
     }
     Array.Sort(arrayMods, (mod1, mod2) => Comparer.Default.Compare(mod1.IndexAA, mod2.IndexAA));
     return arrayMods;
 }
示例#3
0
 public bool Equals(ExplicitMod obj)
 {
     if (ReferenceEquals(null, obj)) return false;
     if (ReferenceEquals(this, obj)) return true;
     return obj.IndexAA == IndexAA &&
         Equals(obj.Modification, Modification);
 }