Add foundation
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
namespace Toolkit.Foundation;
|
||||
|
||||
public class ServiceFactory(Func<Type, object?[]?, object> factory) :
|
||||
IServiceFactory
|
||||
{
|
||||
public TService Create<TService>(params object?[]? parameters) =>
|
||||
(TService)factory(typeof(TService), parameters);
|
||||
|
||||
public object Create(Type type, params object?[]? parameters) =>
|
||||
factory(type, parameters);
|
||||
}
|
||||
Reference in New Issue
Block a user