using System; using System.Collections.Generic; using System.ComponentModel; using System.Runtime.CompilerServices; namespace Gestor.Application.Helpers; public static class NotifyPropertyChangedExtension { public static void MutateVerbose(this INotifyPropertyChanged instance, ref TField field, TField newValue, Action raise, [CallerMemberName] string propertyName = null) { if (!EqualityComparer.Default.Equals(field, newValue)) { field = newValue; raise?.Invoke(new PropertyChangedEventArgs(propertyName)); } } }