Exemplo n.º 1
0
 /// <summary>
 /// Create a new hours class representing 24 hours per day and 7 days per week, except the given exceptions.
 /// </summary>
 /// <param name="ExceptionalOpenings">Exceptions for specified calendar dates, time-range based. Periods the station is operating/accessible. Additional to regular hours. May overlap regular rules.</param>
 /// <param name="ExceptionalClosings">Exceptions for specified calendar dates, time-range based. Periods the station is not operating/accessible. Overwriting regularHours and exceptionalOpenings. Should not overlap exceptionalOpenings.</param>
 private Hours(ExceptionalPeriod ExceptionalOpenings = null,
               ExceptionalPeriod ExceptionalClosings = null)
 {
     this._IsTwentyFourSevenOpen = true;
     this._ExceptionalOpenings   = ExceptionalOpenings;
     this._ExceptionalClosings   = ExceptionalClosings;
 }
Exemplo n.º 2
0
 /// <summary>
 /// Create a new hours class having regular hours, weekday based.
 /// Should not be used for representing 24/7 as this is the most common case.
 /// </summary>
 /// <param name="RegularHours">Regular hours, weekday based. Should not be set for representing 24/7 as this is the most common case.</param>
 /// <param name="ExceptionalOpenings">Exceptions for specified calendar dates, time-range based. Periods the station is operating/accessible. Additional to regular hours. May overlap regular rules.</param>
 /// <param name="ExceptionalClosings">Exceptions for specified calendar dates, time-range based. Periods the station is not operating/accessible. Overwriting regularHours and exceptionalOpenings. Should not overlap exceptionalOpenings.</param>
 public Hours() //RegularHours       RegularHours,
                //ExceptionalPeriod  ExceptionalOpenings = null,
                //ExceptionalPeriod  ExceptionalClosings = null)
 {
     this._IsTwentyFourSevenOpen = false;
     this._RegularHours          = new RegularHours[7];
     this._ExceptionalOpenings   = ExceptionalOpenings;
     this._ExceptionalClosings   = ExceptionalClosings;
 }
Exemplo n.º 3
0
 /// <summary>
 /// Create a new hours class representing 24 hours per day and 7 days per week, except the given exceptions.
 /// </summary>
 /// <param name="ExceptionalOpenings">Exceptions for specified calendar dates, time-range based. Periods the station is operating/accessible. Additional to regular hours. May overlap regular rules.</param>
 /// <param name="ExceptionalClosings">Exceptions for specified calendar dates, time-range based. Periods the station is not operating/accessible. Overwriting regularHours and exceptionalOpenings. Should not overlap exceptionalOpenings.</param>
 public static Hours TwentyFourSevenOpen(ExceptionalPeriod ExceptionalOpenings = null,
                                         ExceptionalPeriod ExceptionalClosings = null)
 {
     return(new Hours(ExceptionalOpenings, ExceptionalClosings));
 }