C# Класс IronPython.Runtime.Binding.SlotOrFunction

Provides an abstraction for calling something which might be a builtin function or might be some arbitrary user defined slot. If the object is a builtin function the call will go directly to the underlying .NET method. If the object is an arbitrary callable object we will setup a nested dynamic site for performing the additional dispatch. TODO: We could probably do a specific binding to the object if it's another IDyanmicObject.
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
Empty SlotOrFunction

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

Метод Описание
GetCombinedTargets ( SlotOrFunction fCand, SlotOrFunction rCand, SlotOrFunction &fTarget, SlotOrFunction &rTarget ) : bool

Combines two methods, which came from two different binary types, selecting the method which has the best set of conversions (the conversions which result in the least narrowing).

GetSlotOrFunction ( PythonContext state, string op ) : SlotOrFunction
ShouldWarn ( PythonContext context, WarningInfo &info ) : bool
SlotOrFunction ( BindingTarget function, DynamicMetaObject target ) : System.Linq.Expressions
SlotOrFunction ( DynamicMetaObject target ) : System.Linq.Expressions
SlotOrFunction ( DynamicMetaObject target, PythonTypeSlot slot ) : System.Linq.Expressions

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

Метод Описание
CheckAlwaysNotImplemented ( IronPython.Runtime.Types.BuiltinFunction xBf ) : IronPython.Runtime.Types.BuiltinFunction
ContainsMethodSignature ( IList existing, MethodBase check ) : bool
MatchesMethodSignature ( ParameterInfo pis, MethodBase mb ) : bool
SlotOrFunction ( ) : System.Linq.Expressions
TryGetBinder ( PythonContext state, DynamicMetaObject types, string op, string rop, SlotOrFunction &res ) : bool
TryGetBinder ( PythonContext state, DynamicMetaObject types, string op, string rop, SlotOrFunction &res, IronPython.Runtime.Types.PythonType &declaringType ) : bool

Tries to get a MethodBinder associated with the slot for the specified type. If a method is found the binder is set and true is returned. If nothing is found binder is null and true is returned. If something other than a method is found false is returned. TODO: Remove rop

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

GetCombinedTargets() публичный статический Метод

Combines two methods, which came from two different binary types, selecting the method which has the best set of conversions (the conversions which result in the least narrowing).
public static GetCombinedTargets ( SlotOrFunction fCand, SlotOrFunction rCand, SlotOrFunction &fTarget, SlotOrFunction &rTarget ) : bool
fCand SlotOrFunction
rCand SlotOrFunction
fTarget SlotOrFunction
rTarget SlotOrFunction
Результат bool

GetSlotOrFunction() публичный статический Метод

public static GetSlotOrFunction ( PythonContext state, string op ) : SlotOrFunction
state PythonContext
op string
Результат SlotOrFunction

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

public ShouldWarn ( PythonContext context, WarningInfo &info ) : bool
context PythonContext
info WarningInfo
Результат bool

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

public SlotOrFunction ( BindingTarget function, DynamicMetaObject target ) : System.Linq.Expressions
function Microsoft.Scripting.Actions.Calls.BindingTarget
target DynamicMetaObject
Результат System.Linq.Expressions

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

public SlotOrFunction ( DynamicMetaObject target ) : System.Linq.Expressions
target DynamicMetaObject
Результат System.Linq.Expressions

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

public SlotOrFunction ( DynamicMetaObject target, PythonTypeSlot slot ) : System.Linq.Expressions
target DynamicMetaObject
slot IronPython.Runtime.Types.PythonTypeSlot
Результат System.Linq.Expressions

Описание свойств

Empty публичное статическое свойство

public static SlotOrFunction,IronPython.Runtime.Binding Empty
Результат SlotOrFunction