Пример #1
0
 public MipsSignalTable AddTimePoint(PsgPoint point)
 {
     if (!timePoints.Select(x => x.TimePoint).Contains <int>(point.TimePoint))
     {
         timePoints.Add(point);
     }
     return(new MipsSignalTable(timePoints));
 }
Пример #2
0
 public MipsSignalTable RemoveTimePoint(PsgPoint point)
 {
     if (timePoints.Select(x => x.TimePoint).Contains <int>(point.TimePoint))
     {
         timePoints.Remove(point);
     }
     return(new MipsSignalTable(timePoints));
 }
Пример #3
0
 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));
 }
Пример #4
0
 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);
 }