mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-01-11 06:44:09 +08:00
18f4e9db31
* Added the inotifyPropertyChanged to all the properties and that stops the memory for shooting up
* some more inotify properties added
(cherry picked from commit 26fa05d9b661dadc5ab0257d540ab838a07c43a6)
* Revert "some more inotify properties added"
This reverts commit 845a94c9b2
.
* Removed unnecessary inotifypropertychanged interfaces and cleaned up the code
* removed the ctrl+c from folder plugin
* removed unnecessary init
* Added unit test to check if PropertyChanged is called
* renamed var
* refactored the tests
* formatting and adding comments
* changed access modifier in test
* Used observable collection instead of a list
* clearing the observable collection instead of setting it to a new one
19 lines
536 B
C#
19 lines
536 B
C#
using System;
|
|
using System.ComponentModel;
|
|
using System.Runtime.CompilerServices;
|
|
using System.Windows;
|
|
using JetBrains.Annotations;
|
|
|
|
namespace Wox.Plugin
|
|
{
|
|
public class BaseModel : INotifyPropertyChanged
|
|
{
|
|
public event PropertyChangedEventHandler PropertyChanged;
|
|
|
|
[NotifyPropertyChangedInvocator]
|
|
protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null)
|
|
{
|
|
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
|
|
}
|
|
}
|
|
} |