AccessorTestObject.cs 957 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. using System.ComponentModel;
  2. using System.Runtime.CompilerServices;
  3. namespace Avalonia.Benchmarks.Data
  4. {
  5. internal class AccessorTestObject : INotifyPropertyChanged
  6. {
  7. private string _test;
  8. public string Test
  9. {
  10. get => _test;
  11. set
  12. {
  13. if (_test == value)
  14. {
  15. return;
  16. }
  17. _test = value;
  18. OnPropertyChanged();
  19. }
  20. }
  21. public event PropertyChangedEventHandler PropertyChanged;
  22. public void Execute()
  23. {
  24. }
  25. public void Execute(object p0)
  26. {
  27. }
  28. public void Execute(object p0, object p1)
  29. {
  30. }
  31. protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null)
  32. {
  33. PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
  34. }
  35. }
  36. }