using System; using System.ComponentModel; using System.Web.Script.Serialization; using System.Windows.Input; using DTS.Common.Enums; using DTS.Common.Interface.ISO.ExtraProperties; namespace DTS.Common.Classes.TestSetups { [Serializable] public class ExtraProperty : IExtraProperty { public ExtraProperty(IExtraProperty iep) : this() { _key = iep.Key; _value = iep.Value; } public ExtraProperty(string key, string value) : this() { _key = key; _value = value; } public ExtraProperty() { _key = string.Empty; _value = string.Empty; } private string _key; public string Key { get => _key; set { _key = value; OnPropertyChanged("Key"); } } private string _value; public string Value { get => _value; set { _value = value; OnPropertyChanged("Value"); } } private ICommand _pasteCommand; [ScriptIgnore] public ICommand PasteCommand { get => _pasteCommand; set { _pasteCommand = value; OnPropertyChanged("PasteCommand"); } } private UIItemStatus _itemStatus; [ScriptIgnore] public UIItemStatus ItemStatus { get => _itemStatus; set { _itemStatus = value; OnPropertyChanged("ItemStatus"); } } public event PropertyChangedEventHandler PropertyChanged; private void OnPropertyChanged(string propertyName = null) { PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); } } }