-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathWeatherUpdateEventArgs.cs
More file actions
27 lines (23 loc) · 888 Bytes
/
WeatherUpdateEventArgs.cs
File metadata and controls
27 lines (23 loc) · 888 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
using System;
using System.Collections.Generic;
namespace WeatherNotifierService
{
public class WeatherUpdateEventArgs : EventArgs
{
protected List<WeatherMessage> Messages;
public WeatherMessage LatestDiscussionMessage { get; protected set; }
public bool ContainsNewDiscussion { get; protected set; }
public bool ContainsUpdate { get; protected set; }
public IEnumerable<WeatherMessage> WeatherMessages
{
get { return Messages.AsReadOnly(); }
}
public WeatherUpdateEventArgs(List<WeatherMessage> messages, bool hasNewDiscussion, bool containsUpdate)
{
Messages = messages;
ContainsNewDiscussion = hasNewDiscussion;
ContainsUpdate = containsUpdate;
LatestDiscussionMessage = Messages.Find(message => message.IsDiscussion);
}
}
}