<commit_before>using System;

namespace RabbitDB.Entity
{
    public abstract class Entity
    {
        internal bool MarkedForDeletion { get; set; }

        public Entity() { }

        public event EventHandler EntityDeleted;

        public event EventHandler EntityInserted;

        public event EventHandler EntityUpdated;

        internal void RaiseEntityDeleted()
        {
            EventHandler handler = this.EntityDeleted;
            if (handler != null)
            {
                handler(this, EventArgs.Empty);
            }
        }

        internal void RaiseEntityInserted()
        {
            EventHandler handler = this.EntityInserted;
            if (handler != null)
            {
                handler(this, EventArgs.Empty);
            }
        }

        internal void RaiseEntityUpdated()
        {
            EventHandler handler = this.EntityUpdated;
            if (handler != null)
            {
                handler(this, EventArgs.Empty);
            }
        }
    }
}<commit_msg>Smart way of using delegates (kudos to <NAME>)<commit_after>using System;

namespace RabbitDB.Entity
{
    public abstract class Entity
    {
        internal bool MarkedForDeletion { get; set; }

        public Entity() { }

        public event EventHandler EntityDeleted = delegate { };

        public event EventHandler EntityInserted = delegate { };

        public event EventHandler EntityUpdated = delegate { };

        internal void RaiseEntityDeleted()
        {
            this.EntityDeleted(this, EventArgs.Empty);
        }

        internal void RaiseEntityInserted()
        {
            this.EntityInserted(this, EventArgs.Empty);
        }

        internal void RaiseEntityUpdated()
        {
            this.EntityUpdated(this, EventArgs.Empty);
        }
    }
}
{'fraction_non_alphanumeric': 0.07515085024684585, 'fraction_numerical': 0.0, 'mean_word_length': 1.7387387387387387, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, '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': '4306938', 'n_tokens_mistral': 457, 'n_tokens_neox': 438, 'n_words': 112}