private int IndexOfChromInfo <TDocNode, TChromInfo>(ChromatogramSet chromatogramSet, ResultRef <TDocNode, TChromInfo> resultRef, ChromInfoList <TChromInfo> chromInfoList) where TDocNode : DocNode where TChromInfo : ChromInfo { var chromFileInfo = resultRef.FindChromFileInfo(chromatogramSet); for (int i = 0; i < chromInfoList.Count; i++) { var chromInfo = chromInfoList[i]; if (!ReferenceEquals(chromInfo.FileId, chromFileInfo.Id)) { continue; } if (resultRef.GetOptimizationStep(chromInfo) != resultRef.OptimizationStep) { continue; } return(i); } return(-1); }
private IEnumerable <Tuple <ElementRef, Annotations> > GetNodeResultAnnotations <TDocNode, TChromInfo>( ResultRef <TDocNode, TChromInfo> resultRef, Results <TChromInfo> results) where TDocNode : DocNode where TChromInfo : ChromInfo { if (null == results) { yield break; } for (int i = 0; i < results.Count; i++) { var chromatogramSet = Document.Settings.MeasuredResults.Chromatograms[i]; foreach (var chromInfo in results[i]) { if (resultRef.GetOptimizationStep(chromInfo) != 0) { continue; } yield return(Tuple.Create((ElementRef)resultRef.ChangeChromInfo(chromatogramSet, chromInfo), resultRef.GetAnnotations(chromInfo))); } } }