public void AddShiftSegment(ShiftSegment shiftSegment, List <ShiftSegment> currentShiftSegmentList) { if (currentShiftSegmentList.Any(c => c.Index == shiftSegment.Index)) { throw new ShiftSegmentIndexCanNotBeDuplicateExceptions(); } ShiftSegments.Add(shiftSegment); }
public void RemoveShiftSegment(ShiftSegment shiftSegment) { ShiftSegments.Remove(shiftSegment); }