An open API service indexing awesome lists of open source software.

https://github.com/theblubb14/blubbichanged

Automatically generate code to add INotifyPropertyChanged and INotifyPropertyChanging to your properties.
https://github.com/theblubb14/blubbichanged

csharp csharp-sourcegenerator inotifypropertychanged inotifypropertychanging mvvm source-code-generator wpf

Last synced: 28 days ago
JSON representation

Automatically generate code to add INotifyPropertyChanged and INotifyPropertyChanging to your properties.

Awesome Lists containing this project

README

          

# BlubbiChanged
Automatically generate code to add INotifyPropertyChanged and INotifyPropertyChanging to your properties.

#### What you write
``` cs
partial class Program
{
///
/// That is my name
///
[AutoNotify]
private string myName;
}
```

#### What will be generated
``` cs
partial class Program : System.ComponentModel.INotifyPropertyChanging, System.ComponentModel.INotifyPropertyChanged
{
///
public event global::System.ComponentModel.PropertyChangingEventHandler PropertyChanging;

///
public event global::System.ComponentModel.PropertyChangedEventHandler PropertyChanged;

///
/// That is my name
///
public string MyName
{
get => this.myName;
set
{
if (global::System.Collections.Generic.EqualityComparer.Default.Equals(this.myName, value))
return;

this.PropertyChanging?.Invoke(this, new global::System.ComponentModel.PropertyChangingEventArgs("MyName"));

this.myName = value;

this.PropertyChanged?.Invoke(this, new global::System.ComponentModel.PropertyChangedEventArgs("MyName"));
}
}
}
```