C# Class System.Linq.Expressions.Interpreter.CallInstruction

Inheritance: Instruction
Show file Open project: dotnet/corefx Class Usage Examples

Public Methods

Method Description
ArrayItemSetter1 ( Array array, int index0, object value ) : void
ArrayItemSetter2 ( Array array, int index0, int index1, object value ) : void
ArrayItemSetter3 ( Array array, int index0, int index1, int index2, object value ) : void
Create ( MethodInfo info ) : CallInstruction
Create ( MethodInfo info, ParameterInfo parameters ) : CallInstruction

Creates a new ReflectedCaller which can be used to quickly invoke the provided MethodInfo.

ToString ( ) : string

Protected Methods

Method Description
InterpretLambdaInvoke ( LightLambda targetLambda, object args ) : object
TryGetLightLambdaTarget ( object instance, LightLambda &lightLambda ) : bool

If the target of invocation happens to be a delegate over enclosed instance lightLambda, return that instance. We can interpret LightLambdas directly.

Private Methods

Method Description
CallInstruction ( ) : System.Collections.Generic
GetArrayAccessor ( MethodInfo info, int argumentCount ) : CallInstruction
IndexIsNotReturnType ( int index, MethodInfo target, ParameterInfo pi ) : bool
ShouldCache ( MethodInfo info ) : bool
SlowCreate ( MethodInfo info, ParameterInfo pis ) : CallInstruction

Uses reflection to create new instance of the appropriate ReflectedCaller

TryGetParameterOrReturnType ( MethodInfo target, ParameterInfo pi, int index ) : Type

Gets the next type or null if no more types are available.

Method Details

ArrayItemSetter1() public static method

public static ArrayItemSetter1 ( Array array, int index0, object value ) : void
array Array
index0 int
value object
return void

ArrayItemSetter2() public static method

public static ArrayItemSetter2 ( Array array, int index0, int index1, object value ) : void
array Array
index0 int
index1 int
value object
return void

ArrayItemSetter3() public static method

public static ArrayItemSetter3 ( Array array, int index0, int index1, int index2, object value ) : void
array Array
index0 int
index1 int
index2 int
value object
return void

Create() public static method

public static Create ( MethodInfo info ) : CallInstruction
info System.Reflection.MethodInfo
return CallInstruction

Create() public static method

Creates a new ReflectedCaller which can be used to quickly invoke the provided MethodInfo.
public static Create ( MethodInfo info, ParameterInfo parameters ) : CallInstruction
info System.Reflection.MethodInfo
parameters System.Reflection.ParameterInfo
return CallInstruction

InterpretLambdaInvoke() protected method

protected InterpretLambdaInvoke ( LightLambda targetLambda, object args ) : object
targetLambda LightLambda
args object
return object

ToString() public method

public ToString ( ) : string
return string

TryGetLightLambdaTarget() protected static method

If the target of invocation happens to be a delegate over enclosed instance lightLambda, return that instance. We can interpret LightLambdas directly.
protected static TryGetLightLambdaTarget ( object instance, LightLambda &lightLambda ) : bool
instance object
lightLambda LightLambda
return bool