<commit_before>﻿using System;
using System.Collections;
using System.Linq;
using System.Reflection;

namespace NHibernate.Util
{
	internal static class MakeQueryableHelper
    {
		private static readonly Lazy<MethodInfo> _implMethod = new Lazy<MethodInfo>(() =>
			typeof(MakeQueryableHelper).GetMethod(nameof(MakeQueryableImpl), BindingFlags.Static | BindingFlags.NonPublic));

		public static object MakeQueryable(IEnumerable enumerable, System.Type elementType)
		{
			return _implMethod.Value.MakeGenericMethod(elementType).Invoke(null, new object[] { enumerable });
		}

		private static object MakeQueryableImpl<TElement>(IEnumerable enumerable)
		{
			return enumerable.Cast<TElement>().AsQueryable();
		}
	}
}<commit_msg>Use reflection helper<commit_after>﻿using System;
using System.Collections;
using System.Linq;
using System.Reflection;

namespace NHibernate.Util
{
	internal static class MakeQueryableHelper
	{
		private static readonly MethodInfo _implMethodDefinition =
			ReflectHelper.GetMethodDefinition(() => MakeQueryableImpl<object>(null));

		public static object MakeQueryable(IEnumerable enumerable, System.Type elementType)
		{
			return _implMethodDefinition.MakeGenericMethod(elementType).Invoke(null, new object[] { enumerable });
		}

		private static object MakeQueryableImpl<TElement>(IEnumerable enumerable)
		{
			return enumerable.Cast<TElement>().AsQueryable();
		}
	}
}
{'fraction_non_alphanumeric': 0.09608540925266904, 'fraction_numerical': 0.0, 'mean_word_length': 6.284974093264249, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 12, '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': '813036', 'n_tokens_mistral': 423, 'n_tokens_neox': 387, 'n_words': 85}