<commit_before>﻿namespace King.MQC
{
    using System;
    using System.Reflection;

    /// <summary>
    /// Deftault 'Queue'; direct binding
    /// </summary>
    public class DirectQueue : IQueue
    {
        #region Members
        /// <summary>
        /// Method Binding Flags
        /// </summary>
        protected static BindingFlags methodFlags = BindingFlags.Public | BindingFlags.Instance | BindingFlags.InvokeMethod | BindingFlags.DeclaredOnly;
        #endregion

        #region Methods
        /// <summary>
        /// Send
        /// </summary>
        /// <param name="route">Route</param>
        /// <param name="model">Model</param>
        public virtual void Send(string route, object model)
        {
            var t = RouteTable.Routes[route];
            var obj = Activator.CreateInstance(t);
            t.InvokeMember("Set", methodFlags, null, obj, new[] { model });
        }

        /// <summary>
        /// Get Data
        /// </summary>
        /// <typeparam name="T">Type</typeparam>
        /// <param name="route">Route</param>
        /// <param name="model">Model</param>
        /// <returns>Data</returns>
        public virtual T Get<T>(string route, object model = null)
        {
            var t = RouteTable.Routes[route];
            var obj = Activator.CreateInstance(t);
            return (T)t.InvokeMember("Get", methodFlags, null, obj, null);
        }
        #endregion
    }
}<commit_msg>better<commit_after>﻿namespace King.MQC
{
    using System;
    using System.Reflection;

    /// <summary>
    /// Deftault 'Queue'; direct binding
    /// </summary>
    public class DirectQueue : IQueue
    {
        #region Members
        /// <summary>
        /// Method Binding Flags
        /// </summary>
        protected static BindingFlags methodFlags = BindingFlags.Public | BindingFlags.Instance | BindingFlags.InvokeMethod | BindingFlags.DeclaredOnly;
        #endregion

        #region Methods
        /// <summary>
        /// Send
        /// </summary>
        /// <param name="route">Route</param>
        /// <param name="model">Model</param>
        public virtual void Send(string route, object model)
        {
            var t = RouteTable.Routes[route];
            var methodName = route.Substring(route.LastIndexOf(".") + 1);
            var obj = Activator.CreateInstance(t);
            t.InvokeMember(methodName, methodFlags, null, obj, new[] { model });
        }

        /// <summary>
        /// Get Data
        /// </summary>
        /// <typeparam name="T">Type</typeparam>
        /// <param name="route">Route</param>
        /// <param name="model">Model</param>
        /// <returns>Data</returns>
        public virtual T Get<T>(string route, object model = null)
        {
            var t = RouteTable.Routes[route];
            var methodName = route.Substring(route.LastIndexOf(".") + 1);
            var obj = Activator.CreateInstance(t);
            return (T)t.InvokeMember(methodName, methodFlags, null, obj, null);
        }
        #endregion
    }
}
{'fraction_non_alphanumeric': 0.14178373080692583, 'fraction_numerical': 0.0006533812479581836, 'mean_word_length': 1.827331486611265, 'pattern_counts': {'":': 0, '<': 45, '<?xml version=': 0, '>': 45, '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': '3791575', 'n_tokens_mistral': 838, 'n_tokens_neox': 815, 'n_words': 192}