blob: d37110c5c56da1ce456613e6e4c5e5ae68c9cd09 (
plain)
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
namespace RealTimeGraphX
{
/// <summary>
/// Represents an <see cref="INotifyPropertyChanged"/> supported graph object.
/// </summary>
/// <seealso cref="System.ComponentModel.INotifyPropertyChanged" />
public abstract class GraphObject : INotifyPropertyChanged
{
/// <summary>
/// Occurs when a property value changes.
/// </summary>
[field: NonSerialized]
public event PropertyChangedEventHandler PropertyChanged;
/// <summary>
/// Raises the property changed event.
/// </summary>
/// <param name="propName">Name of the property.</param>
protected virtual void RaisePropertyChangedAuto([CallerMemberName] string caller = null)
{
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(caller));
}
/// <summary>
/// Raises the property changed event.
/// </summary>
/// <param name="propName">Name of the property.</param>
protected virtual void RaisePropertyChanged(String propName)
{
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propName));
}
}
}
|