Winify – Blame information for rev 83
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
1 | office | 1 | using System; |
83 | office | 2 | using System.Collections.Generic; |
3 | using System.ComponentModel; |
||
4 | using System.Runtime.CompilerServices; |
||
1 | office | 5 | using Newtonsoft.Json; |
24 | office | 6 | using Servers; |
83 | office | 7 | using Winify.Properties; |
1 | office | 8 | |
9 | namespace Winify.Gotify |
||
10 | { |
||
28 | office | 11 | /// <summary> |
12 | /// {"id":22,"appid":1,"message":"iot","title":"Arcade |
||
13 | /// Netplay","priority":0,"date":"2022-10-26T14:55:59.050734643+03:00"} |
||
14 | /// </summary> |
||
83 | office | 15 | public class GotifyMessage : INotifyPropertyChanged |
1 | office | 16 | { |
83 | office | 17 | private int _id; |
18 | private int _appId; |
||
19 | private string _message; |
||
20 | private string _title; |
||
21 | private int _priority; |
||
22 | private DateTime _date; |
||
23 | private GotifyMessageExtras _extras = new GotifyMessageExtras(); |
||
24 | private Server _server; |
||
25 | |||
1 | office | 26 | #region Public Enums, Properties and Fields |
27 | |||
83 | office | 28 | [JsonProperty(PropertyName = "id")] |
29 | public int Id |
||
30 | { |
||
31 | get => _id; |
||
32 | set |
||
33 | { |
||
34 | if (value == _id) return; |
||
35 | _id = value; |
||
36 | OnPropertyChanged(); |
||
37 | } |
||
38 | } |
||
1 | office | 39 | |
83 | office | 40 | [JsonProperty(PropertyName = "appid")] |
41 | public int AppId |
||
42 | { |
||
43 | get => _appId; |
||
44 | set |
||
45 | { |
||
46 | if (value == _appId) return; |
||
47 | _appId = value; |
||
48 | OnPropertyChanged(); |
||
49 | } |
||
50 | } |
||
1 | office | 51 | |
52 | [JsonProperty(PropertyName = "message")] |
||
83 | office | 53 | public string Message |
54 | { |
||
55 | get => _message; |
||
56 | set |
||
57 | { |
||
58 | if (value == _message) return; |
||
59 | _message = value; |
||
60 | OnPropertyChanged(); |
||
61 | } |
||
62 | } |
||
1 | office | 63 | |
83 | office | 64 | [JsonProperty(PropertyName = "title")] |
65 | public string Title |
||
66 | { |
||
67 | get => _title; |
||
68 | set |
||
69 | { |
||
70 | if (value == _title) return; |
||
71 | _title = value; |
||
72 | OnPropertyChanged(); |
||
73 | } |
||
74 | } |
||
1 | office | 75 | |
76 | [JsonProperty(PropertyName = "priority")] |
||
83 | office | 77 | public int Priority |
78 | { |
||
79 | get => _priority; |
||
80 | set |
||
81 | { |
||
82 | if (value == _priority) return; |
||
83 | _priority = value; |
||
84 | OnPropertyChanged(); |
||
85 | } |
||
86 | } |
||
1 | office | 87 | |
83 | office | 88 | [JsonProperty(PropertyName = "date")] |
89 | public DateTime Date |
||
90 | { |
||
91 | get => _date; |
||
92 | set |
||
93 | { |
||
94 | if (value.Equals(_date)) return; |
||
95 | _date = value; |
||
96 | OnPropertyChanged(); |
||
97 | } |
||
98 | } |
||
1 | office | 99 | |
66 | office | 100 | [JsonProperty(PropertyName = "extras")] |
83 | office | 101 | public GotifyMessageExtras Extras |
102 | { |
||
103 | get => _extras; |
||
104 | set |
||
105 | { |
||
106 | if (Equals(value, _extras)) return; |
||
107 | _extras = value; |
||
108 | OnPropertyChanged(); |
||
109 | } |
||
110 | } |
||
66 | office | 111 | |
83 | office | 112 | [JsonIgnore] |
113 | public Server Server |
||
114 | { |
||
115 | get => _server; |
||
116 | set |
||
117 | { |
||
118 | if (Equals(value, _server)) return; |
||
119 | _server = value; |
||
120 | OnPropertyChanged(); |
||
121 | OnPropertyChanged(); |
||
122 | } |
||
123 | } |
||
24 | office | 124 | |
1 | office | 125 | #endregion |
83 | office | 126 | |
127 | [UsedImplicitly] |
||
128 | public GotifyMessage() |
||
129 | { |
||
130 | |||
131 | } |
||
132 | |||
133 | public event PropertyChangedEventHandler PropertyChanged; |
||
134 | |||
135 | protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null) |
||
136 | { |
||
137 | PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); |
||
138 | } |
||
1 | office | 139 | } |
140 | } |