Winify – Blame information for rev 29
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
15 | office | 1 | using System.ComponentModel; |
2 | using System.Runtime.CompilerServices; |
||
3 | using System.Xml.Serialization; |
||
25 | office | 4 | using Announcements.Properties; |
15 | office | 5 | |
6 | namespace Announcements |
||
7 | { |
||
8 | public class Announcement : INotifyPropertyChanged |
||
9 | { |
||
28 | office | 10 | #region Interface |
11 | |||
12 | public event PropertyChangedEventHandler PropertyChanged; |
||
13 | |||
14 | #endregion |
||
15 | |||
16 | #region Private Methods |
||
17 | |||
18 | [NotifyPropertyChangedInvocator] |
||
19 | protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null) |
||
20 | { |
||
21 | PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); |
||
22 | } |
||
23 | |||
24 | #endregion |
||
25 | |||
15 | office | 26 | #region Public Enums, Properties and Fields |
27 | |||
28 | office | 28 | [XmlIgnore] public string Id => _appId.ToString(); |
15 | office | 29 | |
30 | [XmlElement(ElementName = "AppId")] |
||
31 | public int AppId |
||
32 | { |
||
33 | get => _appId; |
||
34 | set |
||
35 | { |
||
28 | office | 36 | if (value == _appId) return; |
15 | office | 37 | |
38 | _appId = value; |
||
39 | OnPropertyChanged(); |
||
40 | } |
||
41 | } |
||
42 | |||
43 | [XmlElement(ElementName = "LingerTime")] |
||
44 | public int LingerTime |
||
45 | { |
||
46 | get => _lingerTime; |
||
47 | set |
||
48 | { |
||
28 | office | 49 | if (value == _lingerTime) return; |
15 | office | 50 | |
51 | _lingerTime = value; |
||
52 | OnPropertyChanged(); |
||
53 | } |
||
54 | } |
||
55 | |||
56 | [XmlElement(ElementName = "Speak")] |
||
57 | public string Speak |
||
58 | { |
||
59 | get => _speak; |
||
60 | set |
||
61 | { |
||
28 | office | 62 | if (value == _speak) return; |
15 | office | 63 | |
64 | _speak = value; |
||
65 | OnPropertyChanged(); |
||
66 | } |
||
67 | } |
||
68 | |||
69 | #endregion |
||
70 | |||
71 | #region Private Delegates, Events, Enums, Properties, Indexers and Fields |
||
72 | |||
73 | private int _appId; |
||
74 | |||
21 | office | 75 | private int _lingerTime = 5000; |
15 | office | 76 | |
21 | office | 77 | private string _speak = string.Empty; |
15 | office | 78 | |
79 | #endregion |
||
80 | |||
81 | #region Constructors, Destructors and Finalizers |
||
82 | |||
83 | [UsedImplicitly] |
||
84 | public Announcement() |
||
85 | { |
||
86 | } |
||
87 | |||
88 | public Announcement(int appId, int lingerTime, string speak) : this() |
||
89 | { |
||
90 | AppId = appId; |
||
91 | LingerTime = lingerTime; |
||
92 | Speak = speak; |
||
93 | } |
||
94 | |||
95 | #endregion |
||
96 | } |
||
97 | } |