public MipsSignalTable AddTimePoint(PsgPoint point) { if (!timePoints.Select(x => x.TimePoint).Contains <int>(point.TimePoint)) { timePoints.Add(point); } return(new MipsSignalTable(timePoints)); }
public MipsSignalTable RemoveTimePoint(PsgPoint point) { if (timePoints.Select(x => x.TimePoint).Contains <int>(point.TimePoint)) { timePoints.Remove(point); } return(new MipsSignalTable(timePoints)); }
public void ReferenceTimePoint(PsgPoint point, int loopCount) { if (point == null) { throw new ArgumentNullException(nameof(point)); } if (loopCount < 1) { throw new ArgumentOutOfRangeException(nameof(loopCount), "Loop count cannot be < 1!"); } UpdatePsgPointLoopData(new LoopData(loopCount, point.Name, true)); }
private static int?GetLoopCount(List <PsgPoint> points, PsgPoint point) { foreach (var psgPoint in points) { var psgPointLoopData = psgPoint.PsgPointLoopData; if (psgPointLoopData.DoLoop && psgPointLoopData.LoopToName.Equals(point.Name)) { return(psgPointLoopData.LoopCount); } } return(null); }