C# Класс 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.
Показать файл Открыть проект Примеры использования класса

Private Properties

Свойство Тип Описание
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

Открытые методы

Метод Описание
GetParameterTypes ( ) : System.Type[]
GetParameters ( ) : IList
GetVisibleParameterCount ( ) : int

Приватные методы

Метод Описание
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

Описание методов

GetParameterTypes() публичный Метод

public GetParameterTypes ( ) : System.Type[]
Результат System.Type[]

GetParameters() публичный Метод

public GetParameters ( ) : IList
Результат IList

GetVisibleParameterCount() публичный Метод

public GetVisibleParameterCount ( ) : int
Результат int