<commit_before>using System;
using System.Collections.Generic;
using GraphQL.Types;

namespace GraphQL.Utilities
{
    public static class GraphTypeTypeRegistry
    {
        static readonly Dictionary<Type, Type> _entries;

        static GraphTypeTypeRegistry()
        {
            _entries = new Dictionary<Type, Type>
            {
                [typeof(int)] = typeof(IntGraphType),
                [typeof(long)] = typeof(IntGraphType),
                [typeof(double)] = typeof(FloatGraphType),
                [typeof(float)] = typeof(FloatGraphType),
                [typeof(decimal)] = typeof(DecimalGraphType),
                [typeof(string)] = typeof(StringGraphType),
                [typeof(bool)] = typeof(BooleanGraphType),
                [typeof(DateTime)] = typeof(DateGraphType),
                [typeof(DateTimeOffset)] = typeof(DateTimeOffsetGraphType),
                [typeof(TimeSpan)] = typeof(TimeSpanSecondsGraphType)
            };
        }

        public static void Register(Type clrType, Type graphType)
        {
            _entries[clrType] = graphType;
        }

        public static Type Get(Type clrType)
        {
            if (_entries.TryGetValue(clrType, out var graphType))
            {
                return graphType;
            }

            return null;<commit_msg>add Generic Version of Register and Get Method (#908)<commit_after>using System;
using System.Collections.Generic;
using GraphQL.Types;

namespace GraphQL.Utilities
{
    public static class GraphTypeTypeRegistry
    {
        static readonly Dictionary<Type, Type> _entries;

        static GraphTypeTypeRegistry()
        {
            _entries = new Dictionary<Type, Type>
            {
                [typeof(int)] = typeof(IntGraphType),
                [typeof(long)] = typeof(IntGraphType),
                [typeof(double)] = typeof(FloatGraphType),
                [typeof(float)] = typeof(FloatGraphType),
                [typeof(decimal)] = typeof(DecimalGraphType),
                [typeof(string)] = typeof(StringGraphType),
                [typeof(bool)] = typeof(BooleanGraphType),
                [typeof(DateTime)] = typeof(DateGraphType),
                [typeof(DateTimeOffset)] = typeof(DateTimeOffsetGraphType),
                [typeof(TimeSpan)] = typeof(TimeSpanSecondsGraphType)
            };
        }

        public static void Register<T, TGraph>()  where TGraph : GraphType
        {
            Register(typeof(T), typeof(TGraph));
        }

        public static void Register(Type clrType, Type graphType)
        {
            _entries[clrType] = graphType;
        }

        public static Type Get<TClr>() 
        {
            return Get(typeof(TClr));
        }


        public static Type Get(Type clrType)
        {
            if (_entries.TryGetValue(clrType, out var graphType))
            {
                return graphType;
            }

            return null;
{'fraction_non_alphanumeric': 0.09731201088805716, 'fraction_numerical': 0.0010207553589656345, 'mean_word_length': 1.9195630585898709, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '2642694', 'n_tokens_mistral': 762, 'n_tokens_neox': 724, 'n_words': 155}