C# Class 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.
Mostrar archivo Open project: jschementi/iron Class Usage Examples

Public Properties

Property Type Description
Empty SlotOrFunction

Public Methods

Method Description
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

Private Methods

Method Description
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

Method Details

GetCombinedTargets() public static method

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
return bool

GetSlotOrFunction() public static method

public static GetSlotOrFunction ( PythonContext state, string op ) : SlotOrFunction
state PythonContext
op string
return SlotOrFunction

ShouldWarn() public method

public ShouldWarn ( PythonContext context, WarningInfo &info ) : bool
context PythonContext
info WarningInfo
return bool

SlotOrFunction() public method

public SlotOrFunction ( BindingTarget function, DynamicMetaObject target ) : System.Linq.Expressions
function Microsoft.Scripting.Actions.Calls.BindingTarget
target DynamicMetaObject
return System.Linq.Expressions

SlotOrFunction() public method

public SlotOrFunction ( DynamicMetaObject target ) : System.Linq.Expressions
target DynamicMetaObject
return System.Linq.Expressions

SlotOrFunction() public method

public SlotOrFunction ( DynamicMetaObject target, PythonTypeSlot slot ) : System.Linq.Expressions
target DynamicMetaObject
slot IronPython.Runtime.Types.PythonTypeSlot
return System.Linq.Expressions

Property Details

Empty public_oe static_oe property

public static SlotOrFunction,IronPython.Runtime.Binding Empty
return SlotOrFunction