private static DynamicMethodBody CreateClientProxy( DynamicMethodBody methodBody, ConstructorInfo proxyClientClassConstructor, ParameterInfo[] proxyClientClassConstructorParameters) { return(methodBody.Repeater(0, proxyClientClassConstructorParameters.Length - 1, 1, (i, repeaterMethodBody) => repeaterMethodBody .Ldarg(0) .Ldfld(SERVICE_CLIENT_CONSTRUCTOR_PARAMETERS_FIELD_NAME) .LdcI4(i) .Ldelem_Ref() .UnboxAny(proxyClientClassConstructorParameters[i].ParameterType)) .Newobj(proxyClientClassConstructor)); }