Catel/Catel.Fody

ObservableObject setters should check for equality before assigning

Opened this issue · 1 comments

Instead of this:

        public string ExistingProperty
        {
            get => _existingProperty;
            set
            {
                _existingProperty = value;
                RaisePropertyChanged(nameof(ExistingProperty));
            }
        }

into:

        public string ExistingProperty
        {
            get => _existingProperty;
            set
            {
                if (_existingProperty == value)
                {
                    return;
                }

                _existingProperty = value;
                RaisePropertyChanged(nameof(ExistingProperty));
            }
        }
stale commented

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.