using System.Collections.Generic; using System.ComponentModel; using System.Runtime.CompilerServices; using System.Windows.Forms; using System.Xml.Serialization; using Configuration.Properties; namespace Configuration { [XmlRoot(ElementName = "Binding")] public class Binding : INotifyPropertyChanged { #region Public Enums, Properties and Fields [XmlElement(ElementName = "Binding")] public List Keys { get => _binding; set { if (value == _binding) { return; } _binding = value; OnPropertyChanged(); } } #endregion #region Private Delegates, Events, Enums, Properties, Indexers and Fields private List _binding = new List(); #endregion #region Constructors, Destructors and Finalizers [UsedImplicitly] public Binding() { } #endregion #region Interface public event PropertyChangedEventHandler PropertyChanged; #endregion #region Public Overrides public override string ToString() { return string.Join(@"+", _binding); } #endregion #region Private Methods [NotifyPropertyChangedInvocator] protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null) { PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); } #endregion } }