public IEnumerable <TimeSpanRange> RemoveOnTime(TimeSpanRange range)
        {
            var ranges = _onRanges;
            var rangesWithRangeAdded = ranges.Remove(range);

            _onRanges = rangesWithRangeAdded;
            return(rangesWithRangeAdded);
        }
示例#2
0
 public static bool InRange(TimeSpan time, TimeSpanRange range)
 {
     return(time >= range.Start && time < range.End);
 }