예제 #1
0
 public void AddDoseTime(TimeOfDay time)
 {
     if (!Times.ContainsKey(time))
     {
         Times.Add(time, 1);
     }
     else
     {
         Times[time] = Times[time] + 1;
     }
 }
예제 #2
0
        private TimeOfDay NextTimeByPreference(TimeOfDay[] preferences)
        {
            for (var idx = 0; idx < preferences.Length; idx++)
            {
                if (Times.ContainsKey(preferences[idx]))
                {
                    return(preferences[idx]);
                }
            }

            return(TimeOfDay.Unknown);
        }
예제 #3
0
 private int TimeOfDayDoses(TimeOfDay time)
 {
     return(Times.ContainsKey(time) ? Times[time] : 0);
 }