using System.ComponentModel; using System.Runtime.CompilerServices; using System.Xml.Serialization; using Servers.Properties; namespace Servers { [XmlRoot(Namespace = "urn:winify-servers-schema", ElementName = "Servers")] public class Servers : INotifyPropertyChanged { #region Private Delegates, Events, Enums, Properties, Indexers and Fields private BindingListWithCollectionChanged _server = new BindingListWithCollectionChanged(); #endregion #region Constructors, Destructors and Finalizers [UsedImplicitly] public Servers() { } #endregion #region Public Enums, Properties and Fields [XmlElement(ElementName = "Server")] public BindingListWithCollectionChanged Server { get => _server; set { if (Equals(value, _server)) return; _server = value; OnPropertyChanged(); } } #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 } }