Winify – Rev 83
?pathlinks?
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Runtime.CompilerServices;
using Newtonsoft.Json;
using Servers;
using Winify.Properties;
namespace Winify.Gotify
{
/// <summary>
/// {"id":22,"appid":1,"message":"iot","title":"Arcade
/// Netplay","priority":0,"date":"2022-10-26T14:55:59.050734643+03:00"}
/// </summary>
public class GotifyMessage : INotifyPropertyChanged
{
private int _id;
private int _appId;
private string _message;
private string _title;
private int _priority;
private DateTime _date;
private GotifyMessageExtras _extras = new GotifyMessageExtras();
private Server _server;
#region Public Enums, Properties and Fields
[JsonProperty(PropertyName = "id")]
public int Id
{
get => _id;
set
{
if (value == _id) return;
_id = value;
OnPropertyChanged();
}
}
[JsonProperty(PropertyName = "appid")]
public int AppId
{
get => _appId;
set
{
if (value == _appId) return;
_appId = value;
OnPropertyChanged();
}
}
[JsonProperty(PropertyName = "message")]
public string Message
{
get => _message;
set
{
if (value == _message) return;
_message = value;
OnPropertyChanged();
}
}
[JsonProperty(PropertyName = "title")]
public string Title
{
get => _title;
set
{
if (value == _title) return;
_title = value;
OnPropertyChanged();
}
}
[JsonProperty(PropertyName = "priority")]
public int Priority
{
get => _priority;
set
{
if (value == _priority) return;
_priority = value;
OnPropertyChanged();
}
}
[JsonProperty(PropertyName = "date")]
public DateTime Date
{
get => _date;
set
{
if (value.Equals(_date)) return;
_date = value;
OnPropertyChanged();
}
}
[JsonProperty(PropertyName = "extras")]
public GotifyMessageExtras Extras
{
get => _extras;
set
{
if (Equals(value, _extras)) return;
_extras = value;
OnPropertyChanged();
}
}
[JsonIgnore]
public Server Server
{
get => _server;
set
{
if (Equals(value, _server)) return;
_server = value;
OnPropertyChanged();
OnPropertyChanged();
}
}
#endregion
[UsedImplicitly]
public GotifyMessage()
{
}
public event PropertyChangedEventHandler PropertyChanged;
protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null)
{
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
}
}
}
Generated by GNU Enscript 1.6.5.90.