Implement INotifyPropertyChanged
This commit is contained in:
parent
62533cd175
commit
ac41e017d8
|
@ -2,11 +2,12 @@ using System;
|
|||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace Ooui
|
||||
{
|
||||
[Newtonsoft.Json.JsonConverter (typeof (EventTargetJsonConverter))]
|
||||
public abstract class EventTarget
|
||||
public abstract class EventTarget : INotifyPropertyChanged
|
||||
{
|
||||
readonly List<Message> stateMessages = new List<Message> ();
|
||||
|
||||
|
@ -17,6 +18,8 @@ namespace Ooui
|
|||
|
||||
public string TagName { get; private set; }
|
||||
|
||||
public event PropertyChangedEventHandler PropertyChanged;
|
||||
|
||||
public event Action<Message> MessageSent;
|
||||
|
||||
public IReadOnlyList<Message> StateMessages {
|
||||
|
@ -96,6 +99,7 @@ namespace Ooui
|
|||
|
||||
protected virtual void OnPropertyChanged (string propertyName)
|
||||
{
|
||||
PropertyChanged?.Invoke (this, new PropertyChangedEventArgs (propertyName));
|
||||
}
|
||||
|
||||
public const char IdPrefix = '\u2999';
|
||||
|
|
Loading…
Reference in New Issue