This commit is contained in:
CortexCore
2023-06-05 19:57:17 +08:00
parent f05e28ec58
commit 7f2fea821c
6195 changed files with 489001 additions and 636 deletions

View File

@@ -0,0 +1,41 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.Concurrent;
using System.Reflection;
using System.IO;
namespace BITKit
{
public class BITSharp
{
private static readonly ConcurrentDictionary<string, Type> Dictionary = new();
static Assembly[] assemblies;
public static bool TryGetTypeFromFullName(string fullClassName,out Type type)
{
type = GetTypeFromFullName(fullClassName);
return type is not null ? true : false;
}
public static Type GetTypeFromFullName(string fullClassName)
{
return Dictionary.GetOrAdd(fullClassName, SearchType);
}
static Type SearchType(string fullName)
{
assemblies = assemblies??AppDomain.CurrentDomain.GetAssemblies();
foreach (var assembly in assemblies)
{
var type = assembly.GetType(fullName,false);
if (type is not null)
{
return type;
}
else
{
continue;
}
}
return null;
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: baf3ccf13f762a14db1cacb396c6a13a
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: