public void AddDoseTime(TimeOfDay time) { if (!Times.ContainsKey(time)) { Times.Add(time, 1); } else { Times[time] = Times[time] + 1; } }
private TimeOfDay NextTimeByPreference(TimeOfDay[] preferences) { for (var idx = 0; idx < preferences.Length; idx++) { if (Times.ContainsKey(preferences[idx])) { return(preferences[idx]); } } return(TimeOfDay.Unknown); }
private int TimeOfDayDoses(TimeOfDay time) { return(Times.ContainsKey(time) ? Times[time] : 0); }