public IEnumerable <TimeSpanRange> RemoveOnTime(TimeSpanRange range) { var ranges = _onRanges; var rangesWithRangeAdded = ranges.Remove(range); _onRanges = rangesWithRangeAdded; return(rangesWithRangeAdded); }
public static bool InRange(TimeSpan time, TimeSpanRange range) { return(time >= range.Start && time < range.End); }