In this code I noticed the .Notify method is an extension method. Why and what is the code behind this method?
public class Notifier : INotifyPropertyChanged
{
public event PropertyChangedEventHandler PropertyChanged;
(...)
public void NotifyPropertyChanged(Expression<Func<object>> property)
{
this.PropertyChanged.Notify(property);
}
}
This extension method isn’t provided by the .NET framework. Therefore, it is a custom extension method created somewhere in your code. To know what exactly it does, navigate to it and look at the source code (F12).
Generally speaking, I assume it will raise the
PropertyChangedevent with the property name extracted from the expression that is passed to it.