feat: TypeFactory typeName Method

This commit is contained in:
Syntriax 2024-02-10 20:02:24 +03:00
parent 7e48eb8f12
commit 2f6fecdd78
1 changed files with 3 additions and 0 deletions

View File

@ -16,6 +16,9 @@ public static class TypeFactory
throw new Exception();
}
public static T Get<T>(string typeName, params object?[]? args) where T : class
=> Get<T>(Get(typeName), args);
public static T Get<T>(Type type, params object?[]? args) where T : class
{
T? result;