<commit_before>using System.ComponentModel;
using System.Runtime.CompilerServices;
using System.Windows.Controls;
using System.Windows.Media;
using FacePalm.Annotations;

namespace FacePalm {
    public abstract class LineBase : INotifyPropertyChanged {
        private Marker _m1;
        private Marker _m2;

        public string Id { get; set; }

        public string Description { get; set; }

        public bool Visible { get; set; } = true;

        public Marker M1 {
            get => _m1;
            set {
                _m1 = value;
                M1.PropertyChanged += MarkerPropertyChanged;
            }
        }

        public Marker M2 {
            get => _m2;
            set {
                _m2 = value;
                M2.PropertyChanged += MarkerPropertyChanged;
            }
        }

        public bool IsDefined => M1.IsDefined && M2.IsDefined;

        public Brush BackgroundBrush => IsDefined ? MarkerBrush.Background : MarkerBrush.Transparent;

        public virtual event PropertyChangedEventHandler PropertyChanged;

        private void MarkerPropertyChanged(object sender, PropertyChangedEventArgs e) {
            OnPropertyChanged(nameof(IsDefined));
            OnPropertyChanged(nameof(Brush));
            OnPropertyChanged(nameof(BackgroundBrush));
        }

        [NotifyPropertyChangedInvocator]
        private void OnPropertyChanged([CallerMemberName] string propertyName = null) {
            PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
        }

        public void DrawLine(Canvas canvas, double scale) {
        }
    }
}<commit_msg>remove repeated notifications<commit_after>using System.ComponentModel;
using System.Runtime.CompilerServices;
using System.Windows.Controls;
using System.Windows.Media;
using FacePalm.Annotations;

namespace FacePalm {
    public abstract class LineBase : INotifyPropertyChanged {
        private Marker _m1;
        private Marker _m2;

        public string Id { get; set; }

        public string Description { get; set; }

        public bool Visible { get; set; } = true;

        public Marker M1 {
            get => _m1;
            set {
                _m1 = value;
                M1.PropertyChanged += MarkerPropertyChanged;
            }
        }

        public Marker M2 {
            get => _m2;
            set {
                _m2 = value;
                M2.PropertyChanged += MarkerPropertyChanged;
            }
        }

        public bool IsDefined => M1.IsDefined && M2.IsDefined;

        public Brush BackgroundBrush => IsDefined ? MarkerBrush.Background : MarkerBrush.Transparent;

        public virtual event PropertyChangedEventHandler PropertyChanged;

        private void MarkerPropertyChanged(object sender, PropertyChangedEventArgs e) {
            OnPropertyChanged(e.PropertyName);
        }

        [NotifyPropertyChangedInvocator]
        private void OnPropertyChanged([CallerMemberName] string propertyName = null) {
            PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
        }

        public void DrawLine(Canvas canvas, double scale) {
        }
    }
}
{'fraction_non_alphanumeric': 0.07230817808651721, 'fraction_numerical': 0.007578149668455952, 'mean_word_length': 2.187122736418511, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2929591', 'n_tokens_mistral': 823, 'n_tokens_neox': 788, 'n_words': 200}