From 2f6fecdd7813976ec8592d2832967c6218d4e67a Mon Sep 17 00:00:00 2001 From: Syntriax Date: Sat, 10 Feb 2024 20:02:24 +0300 Subject: [PATCH] feat: TypeFactory typeName Method --- Engine.Core/Factory/TypeFactory.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Engine.Core/Factory/TypeFactory.cs b/Engine.Core/Factory/TypeFactory.cs index 8798642..dd3a25b 100644 --- a/Engine.Core/Factory/TypeFactory.cs +++ b/Engine.Core/Factory/TypeFactory.cs @@ -16,6 +16,9 @@ public static class TypeFactory throw new Exception(); } + public static T Get(string typeName, params object?[]? args) where T : class + => Get(Get(typeName), args); + public static T Get(Type type, params object?[]? args) where T : class { T? result;