修改了Ioc相同类型实例化了多个对象的问题

This commit is contained in:
fengjiayi
2024-09-15 19:48:27 +08:00
parent 19247b5afe
commit fe2ccaf74c
8 changed files with 199 additions and 112 deletions

View File

@@ -76,13 +76,13 @@ public static class MethodDetailsHelperTmp
var dllTypeName = $"{assemblyName}.{type.Name}";
object instance = Activator.CreateInstance(type);
// object instance = Activator.CreateInstance(type);
var dllTypeMethodName = $"{assemblyName}.{type.Name}.{method.Name}";
return new MethodDetails
{
ActingInstanceType = type,
ActingInstance = instance,
// ActingInstance = instance,
MethodName = dllTypeMethodName,
MethodDelegate = methodDelegate,
MethodDynamicType = attribute.MethodDynamicType,