C# Класс IronPython.Runtime.Binding.PythonProtocol.Callable

Base class for calling indexers. We have two subclasses that target built-in functions & user defined callable objects. The Callable objects get handed off to ItemBuilder's which then call them with the appropriate arguments.
Показать файл Открыть проект

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

Метод Описание
CompleteRuleTarget ( DynamicMetaObjectBinder metaBinder, DynamicMetaObject args, Func customFailure ) : DynamicMetaObject

Adds the target of the call to the rule.

GetTupleArguments ( DynamicMetaObject arguments ) : DynamicMetaObject[]

Gets the arguments in a form that should be used for extended slicing. Python defines that multiple tuple arguments received (x[1,2,3]) get packed into a Tuple. For most .NET methods we just want to expand this into the multiple index arguments. For slots and old-instances we want to pass in the tuple

MakeCallable ( PythonContext binder, PythonIndexType op, IronPython.Runtime.Types.BuiltinFunction itemFunc, PythonTypeSlot itemSlot ) : Callable

Creates a new CallableObject. If BuiltinFunction is available we'll create a BuiltinCallable otherwise we create a SlotCallable.

Защищенные методы

Метод Описание
Callable ( PythonContext binder, PythonIndexType op ) : System.Linq.Expressions

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

Callable() защищенный Метод

protected Callable ( PythonContext binder, PythonIndexType op ) : System.Linq.Expressions
binder PythonContext
op PythonIndexType
Результат System.Linq.Expressions

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

Adds the target of the call to the rule.
public abstract CompleteRuleTarget ( DynamicMetaObjectBinder metaBinder, DynamicMetaObject args, Func customFailure ) : DynamicMetaObject
metaBinder DynamicMetaObjectBinder
args DynamicMetaObject
customFailure Func
Результат DynamicMetaObject

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

Gets the arguments in a form that should be used for extended slicing. Python defines that multiple tuple arguments received (x[1,2,3]) get packed into a Tuple. For most .NET methods we just want to expand this into the multiple index arguments. For slots and old-instances we want to pass in the tuple
public GetTupleArguments ( DynamicMetaObject arguments ) : DynamicMetaObject[]
arguments DynamicMetaObject
Результат DynamicMetaObject[]

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

Creates a new CallableObject. If BuiltinFunction is available we'll create a BuiltinCallable otherwise we create a SlotCallable.
public static MakeCallable ( PythonContext binder, PythonIndexType op, IronPython.Runtime.Types.BuiltinFunction itemFunc, PythonTypeSlot itemSlot ) : Callable
binder PythonContext
op PythonIndexType
itemFunc IronPython.Runtime.Types.BuiltinFunction
itemSlot IronPython.Runtime.Types.PythonTypeSlot
Результат Callable