Microsoft.Scripting.Interpreter.CallInstruction.Create C# (CSharp) Method

Create() public static method

public static Create ( MethodInfo info ) : CallInstruction
info System.Reflection.MethodInfo
return CallInstruction
        public static CallInstruction Create(MethodInfo info) {
            return Create(info, info.GetParameters());
        }

Same methods

CallInstruction::Create ( MethodInfo info, ParameterInfo parameters ) : CallInstruction

Usage Example

示例#1
0
        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);
        }
All Usage Examples Of Microsoft.Scripting.Interpreter.CallInstruction::Create