public DynamicInstructionN(Type delegateType, CallSite site)
        {
            var methodInfo = delegateType.GetMethod("Invoke");
            var parameters = methodInfo.GetParameters();

            _target         = CallInstruction.Create(methodInfo, parameters);
            _site           = site;
            _argumentCount  = parameters.Length - 1;
            _targetDelegate = site.GetType().GetField("Target").GetValue(site);
        }
        public DynamicInstructionN(Type delegateType, CallSite site)
        {
            MethodInfo method = delegateType.GetMethod("Invoke");

            ParameterInfo[] parameters = method.GetParameters();
            this._target         = CallInstruction.Create(method, parameters);
            this._site           = site;
            this._argumentCount  = parameters.Length - 1;
            this._targetDelegate = site.GetType().GetField("Target").GetValue(site);
        }
 public void EmitCall(MethodInfo method, ParameterInfo[] parameters)
 {
     Emit(CallInstruction.Create(method, parameters));
 }