- really push an empty array onto the stack (#5)

pull/32/head
Simon Gockner 7 years ago
parent cabeef5409
commit 94cc484f0f
  1. 3
      LightweightIocContainer/Registrations/TypedFactoryRegistration.cs

@ -115,7 +115,8 @@ namespace LightweightIocContainer.Registrations
}
else
{
generator.Emit(OpCodes.Ldc_I4_0);
MethodInfo emptyArray = typeof(Array).GetMethod(nameof(Array.Empty))?.MakeGenericMethod(typeof(object));
generator.EmitCall(OpCodes.Call, emptyArray, null);
}
generator.EmitCall(OpCodes.Callvirt, typeof(IInjectorContainer).GetMethod(nameof(IInjectorContainer.Resolve), new[] { typeof(object), typeof(object)}), null);

Loading…
Cancel
Save