private IScheduleElem CreateDefault(ScheduleElemLevel level) { switch (level) { case ScheduleElemLevel.Week: return(defaultFactory.GetWeek()); case ScheduleElemLevel.Day: return(defaultFactory.GetDay()); case ScheduleElemLevel.Undefined: return(defaultFactory.GetUndefined()); default: throw new ArgumentOutOfRangeException($"Cannot create default for {level}"); } }
public MergeStrategy GetStrategy(ScheduleElemLevel level) { switch (level) { case ScheduleElemLevel.Week: return(new WeekMergeStrategy(this)); case ScheduleElemLevel.Day: return(new DayMergeStrategy(this, dmLogger)); case ScheduleElemLevel.Undefined: return(new UndefinedMergeStrategy(this)); default: throw new NotImplementedException(); } }