C# Class Microsoft.Scripting.Actions.Calls.MethodCandidate

MethodCandidate represents the different possible ways of calling a method or a set of method overloads. A single method can result in multiple MethodCandidates. Some reasons include: - Every optional parameter or parameter with a default value will result in a candidate - The presence of ref and out parameters will add a candidate for languages which want to return the updated values as return values. - ArgumentKind.List and ArgumentKind.Dictionary can result in a new candidate per invocation since the list might be different every time. Each MethodCandidate represents the parameter type for the candidate using ParameterWrapper.
Exibir arquivo Open project: jschementi/iron Class Usage Examples

Private Properties

Property Type Description
GetArgumentExpressions Expression[]
GetConsumedArguments int
GetParameter Microsoft.Scripting.Actions.Calls.ParameterWrapper
GetParameter Microsoft.Scripting.Actions.Calls.ParameterWrapper
IndexOfParameter int
MakeExpression Expression
MakeParamsExtended MethodCandidate
MakeParamsExtended MethodCandidate
MethodCandidate System.Linq.Expressions
RemoveNulls Expression[]
ReplaceMethod MethodCandidate
ToString string

Public Methods

Method Description
GetParameterTypes ( ) : System.Type[]
GetParameters ( ) : IList
GetVisibleParameterCount ( ) : int

Private Methods

Method Description
GetArgumentExpressions ( Microsoft.Scripting.Actions.Calls.RestrictedArguments restrictedArgs, bool &usageMarkers, Expression &spilledArgs ) : Expression[]
GetConsumedArguments ( ) : int
GetParameter ( int parameterIndex ) : Microsoft.Scripting.Actions.Calls.ParameterWrapper
GetParameter ( int argumentIndex, Microsoft.Scripting.Actions.Calls.ArgumentBinding namesBinding ) : Microsoft.Scripting.Actions.Calls.ParameterWrapper
IndexOfParameter ( string name ) : int
MakeExpression ( Microsoft.Scripting.Actions.Calls.RestrictedArguments restrictedArgs ) : Expression
MakeParamsExtended ( int count, IList names ) : MethodCandidate

Builds a new MethodCandidate which takes count arguments and the provided list of keyword arguments. The basic idea here is to figure out which parameters map to params or a dictionary params and fill in those spots w/ extra ParameterWrapper's.

MakeParamsExtended ( string names, int nameIndices, List parameters ) : MethodCandidate
MethodCandidate ( OverloadResolver resolver, OverloadInfo method, List parameters, Microsoft.Scripting.Actions.Calls.ParameterWrapper paramsDict, ReturnBuilder returnBuilder, Microsoft.Scripting.Actions.Calls.InstanceBuilder instanceBuilder, IList argBuilders, BindingRestrictions>.Dictionary restrictions ) : System.Linq.Expressions
RemoveNulls ( Expression args ) : Expression[]
ReplaceMethod ( OverloadInfo newMethod, List parameters, IList argBuilders, BindingRestrictions>.Dictionary restrictions ) : MethodCandidate
ToString ( ) : string

Method Details

GetParameterTypes() public method

public GetParameterTypes ( ) : System.Type[]
return System.Type[]

GetParameters() public method

public GetParameters ( ) : IList
return IList

GetVisibleParameterCount() public method

public GetVisibleParameterCount ( ) : int
return int