2016-05-23 21:08:13 +00:00
|
|
|
|
using System.ComponentModel;
|
|
|
|
|
|
using System.Runtime.CompilerServices;
|
|
|
|
|
|
using JetBrains.Annotations;
|
|
|
|
|
|
|
2020-04-21 09:12:17 +00:00
|
|
|
|
namespace Flow.Launcher.Plugin
|
2016-05-23 21:08:13 +00:00
|
|
|
|
{
|
2022-08-09 00:35:38 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Base model for plugin classes
|
|
|
|
|
|
/// </summary>
|
2016-05-23 21:08:13 +00:00
|
|
|
|
public class BaseModel : INotifyPropertyChanged
|
|
|
|
|
|
{
|
2022-08-09 00:35:38 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Property changed event handler
|
|
|
|
|
|
/// </summary>
|
2016-05-23 21:08:13 +00:00
|
|
|
|
public event PropertyChangedEventHandler PropertyChanged;
|
|
|
|
|
|
|
2022-08-09 00:35:38 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Invoked when a property changes
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="propertyName"></param>
|
2016-05-23 21:08:13 +00:00
|
|
|
|
[NotifyPropertyChangedInvocator]
|
|
|
|
|
|
protected void OnPropertyChanged([CallerMemberName] string propertyName = null)
|
|
|
|
|
|
{
|
|
|
|
|
|
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2022-08-09 00:35:38 +00:00
|
|
|
|
}
|