<commit_before>﻿using System;

namespace SharpexGL.Framework.Events
{
    public class EventObserver<T> : IObserver<IEvent> where T : class
    {
        private Action<T> _action;
        /// <summary>
        /// Tracks the event to it's delegate.
        /// </summary>
        /// <param name="value"></param>
        public void OnNext(IEvent value)
        {
            if (_action != null)
            {
                _action((T)value);
            }
        }
        /// <summary>
        /// On Error.
        /// </summary>
        /// <param name="error">The Error.</param>
        public void OnError(Exception error)
        {
        
        }
        /// <summary>
        /// On Completed.
        /// </summary>
        public void OnCompleted()
        {
          
        }
        /// <summary>
        /// Creates a new EventObserver.
        /// </summary>
        /// <param name="action">The Delegate.</param>
        public EventObserver(Action<T> action)
        {
            _action = action;
        }
    }
}
<commit_msg>Made _action readonly<commit_after>﻿using System;

namespace SharpexGL.Framework.Events
{
    public class EventObserver<T> : IObserver<IEvent> where T : class
    {
        private readonly Action<T> _action;
        /// <summary>
        /// Tracks the event to it's delegate.
        /// </summary>
        /// <param name="value"></param>
        public void OnNext(IEvent value)
        {
            if (_action != null)
            {
                _action((T)value);
            }
        }
        /// <summary>
        /// On Error.
        /// </summary>
        /// <param name="error">The Error.</param>
        public void OnError(Exception error)
        {
        
        }
        /// <summary>
        /// On Completed.
        /// </summary>
        public void OnCompleted()
        {
          
        }
        /// <summary>
        /// Creates a new EventObserver.
        /// </summary>
        /// <param name="action">The Delegate.</param>
        public EventObserver(Action<T> action)
        {
            _action = action;
        }
    }
}

{'fraction_non_alphanumeric': 0.1379633974659784, 'fraction_numerical': 0.0, 'mean_word_length': 1.2208333333333334, 'pattern_counts': {'":': 0, '<': 39, '<?xml version=': 0, '>': 39, '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': '3430291', 'n_tokens_mistral': 580, 'n_tokens_neox': 570, 'n_words': 131}