public void AddMoodData(MoodData data, int amount) { ActiveMoodData activeMoodData = GetActiveMoodData(data); if (activeMoodData == null) { activeMoodData = new ActiveMoodData(data); ActiveMoodDataItems.Add(activeMoodData); } activeMoodData.Amount += amount; }
public ActiveMoodData GetActiveMoodData(MoodData data) { foreach (var activeMoodData in ActiveMoodDataItems) { if (activeMoodData.MoodData == data) { return(activeMoodData); } } return(null); }
public ActiveMoodData(MoodData data, int amount) : base(data) { this.Amount = amount; }
public ActiveMoodData(MoodData data) : base(data) { }
public async Task SetMood([FromBody] MoodData data) { await _service.SetMood(data, User.Identity.Name); }
public async Task <MoodData> GetMood([FromBody] MoodData data) { return(await _service.GetMood(data, User.Identity.Name)); }