This commit is contained in:
CortexCore
2024-06-08 10:07:40 +08:00
parent ccc9957809
commit b9731c20a1
11 changed files with 231 additions and 44 deletions

View File

@@ -53,6 +53,10 @@ namespace BITKit
private static Type SearchType(string fullName)
{
if (string.IsNullOrWhiteSpace(fullName))
{
throw new ArgumentException("fullName is null or empty", nameof(fullName));
}
assemblies ??= AppDomain.CurrentDomain.GetAssemblies();
return assemblies.Select(assembly => assembly.GetType(fullName, false)).FirstOrDefault(type => type is not null);
}