Skip to content

Commit

Permalink
make InvokePropertyChanged available to inherited classes
Browse files Browse the repository at this point in the history
  • Loading branch information
foglio1024 committed Jan 5, 2024
1 parent bf007c7 commit b07895e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Nostrum.WPF/ObservableObject.cs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ protected virtual bool RaiseAndSetIfChanged<T>(T value, ref T backingField, [Cal
return true;
}

void InvokePropertyChanged(string? propertyName, int delayMs)
protected virtual void InvokePropertyChanged(string? propertyName, int delayMs)
{
if (delayMs > 0)
{
Expand Down
4 changes: 2 additions & 2 deletions Nostrum.WPF/ThreadSafe/ThreadSafeObservableObject.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ protected sealed override bool RaiseAndSetIfChanged<T>(T value, ref T backingFie
}

/// <inheritdoc />
protected sealed override void InvokePropertyChanged(string? propertyName)
protected sealed override void InvokePropertyChanged([CallerMemberName] string? propertyName = null, int delayMs = 0)
{
_dispatcher.InvokeAsyncIfRequired(() => base.InvokePropertyChanged(propertyName), DispatcherPriority.DataBind);
_dispatcher.InvokeAsyncIfRequired(() => base.InvokePropertyChanged(propertyName, delayMs), DispatcherPriority.DataBind);
}
}

0 comments on commit b07895e

Please sign in to comment.