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

// Inspired from FullSerializer by <NAME>
// From file: Reflection/fsTypeLookup.cs

namespace Ludiq.Reflection.Internal
{
	/// <summary>
	/// An utility class to simply serialize and deserialize .NET types in a Unity context.
	/// </summary>
	public static class TypeSerializer
	{
		/// <summary>
		/// Serializes the specified type to its full name.
		/// </summary>
		public static string Serialize(Type type)
		{
			return type.FullName;
		}

		/// <summary>
		/// Deserializes the specified full type name to a type.
		/// </summary>
		public static Type Deserialize(string fullName)
		{
			// Look for the type if the default assembly

			Type type = Type.GetType(fullName, false, false);

			if (type != null)
			{
				return type;
			}

#if (!UNITY_METRO) // No AppDomain on WinRT

			// Look for types in other loaded assemblies

			foreach (Assembly assembly in AppDomain.CurrentDomain.GetAssemblies())
			{
				type = assembly.GetType(fullName);

				if (type != null)
				{
					return type;
				}
			}
#endif

			throw new Exception("Failed to deserialize type: " + fullName);
		}
	}
}<commit_msg>Fixed bug for Windows Metro not recognizing the type name method<commit_after>﻿using System;
using System.Reflection;

// Inspired from FullSerializer by <NAME>
// From file: Reflection/fsTypeLookup.cs

namespace Ludiq.Reflection.Internal
{
	/// <summary>
	/// An utility class to simply serialize and deserialize .NET types in a Unity context.
	/// </summary>
	public static class TypeSerializer
	{
		/// <summary>
		/// Serializes the specified type to its full name.
		/// </summary>
		public static string Serialize(Type type)
		{
			return type.FullName;
		}

		/// <summary>
		/// Deserializes the specified full type name to a type.
		/// </summary>
		public static Type Deserialize(string fullName)
		{
			// Look for the type if the default assembly

#if (!UNITY_METRO)
			Type type = Type.GetType(fullName, false, false);
#else
            Type type = Type.GetType(fullName, false); // Third argument not always supported
#endif

			if (type != null)
			{
				return type;
			}

#if (!UNITY_METRO) // No AppDomain on WinRT

			// Look for types in other loaded assemblies

			foreach (Assembly assembly in AppDomain.CurrentDomain.GetAssemblies())
			{
				type = assembly.GetType(fullName);

				if (type != null)
				{
					return type;
				}
			}
#endif

			throw new Exception("Failed to deserialize type: " + fullName);
		}
	}
}
{'fraction_non_alphanumeric': 0.10929397686477862, 'fraction_numerical': 0.0, 'mean_word_length': 2.876352395672334, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, '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': '7304883', 'n_tokens_mistral': 874, 'n_tokens_neox': 741, 'n_words': 259}