예제 #1
0
 public void DeleteDailyMood(DailyMood mood)
 {
     if (set.Contains(mood))
     {
         set.Remove(mood);
     }
 }
예제 #2
0
 public void AddDailyMood(DailyMood mood)
 {
     if (!set.Contains(mood))
     {
         set.Add(mood);
     }
 }
예제 #3
0
        public void ModifyDailyMood(DailyMood mood)
        {
            ISet <DailyMood> moodToUpdate = set.Where(x => x.Date.Equals(mood.
                                                                         Date)).ToHashSet();

            if (moodToUpdate.Count > 0)
            {
                moodToUpdate.First().Value = mood.Value;
            }
        }