Winify – Rev 25
?pathlinks?
using System.ComponentModel;
using System.Runtime.CompilerServices;
using System.Xml.Serialization;
using Announcements.Properties;
namespace Announcements
{
public class Announcement : INotifyPropertyChanged
{
#region Public Enums, Properties and Fields
[XmlIgnore]
public string Id => _appId.ToString();
[XmlElement(ElementName = "AppId")]
public int AppId
{
get => _appId;
set
{
if (value == _appId)
{
return;
}
_appId = value;
OnPropertyChanged();
}
}
[XmlElement(ElementName = "LingerTime")]
public int LingerTime
{
get => _lingerTime;
set
{
if (value == _lingerTime)
{
return;
}
_lingerTime = value;
OnPropertyChanged();
}
}
[XmlElement(ElementName = "Speak")]
public string Speak
{
get => _speak;
set
{
if (value == _speak)
{
return;
}
_speak = value;
OnPropertyChanged();
}
}
#endregion
#region Private Delegates, Events, Enums, Properties, Indexers and Fields
private int _appId;
private int _lingerTime = 5000;
private string _speak = string.Empty;
#endregion
#region Constructors, Destructors and Finalizers
[UsedImplicitly]
public Announcement()
{
}
public Announcement(int appId, int lingerTime, string speak) : this()
{
AppId = appId;
LingerTime = lingerTime;
Speak = speak;
}
#endregion
#region Interface
public event PropertyChangedEventHandler PropertyChanged;
#endregion
#region Private Methods
[NotifyPropertyChangedInvocator]
protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null)
{
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
}
#endregion
}
}
Generated by GNU Enscript 1.6.5.90.