-
-
Notifications
You must be signed in to change notification settings - Fork 600
Expand file tree
/
Copy pathBaseModel.cs
More file actions
27 lines (25 loc) · 805 Bytes
/
BaseModel.cs
File metadata and controls
27 lines (25 loc) · 805 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
using System.ComponentModel;
using System.Runtime.CompilerServices;
using JetBrains.Annotations;
namespace Flow.Launcher.Plugin
{
/// <summary>
/// Base model for plugin classes
/// </summary>
public class BaseModel : INotifyPropertyChanged
{
/// <summary>
/// Property changed event handler
/// </summary>
public event PropertyChangedEventHandler PropertyChanged;
/// <summary>
/// Invoked when a property changes
/// </summary>
/// <param name="propertyName"></param>
[NotifyPropertyChangedInvocator]
protected void OnPropertyChanged([CallerMemberName] string propertyName = null)
{
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
}
}
}