Class Closure
A class representing a script function
Inherited Members
Namespace: System.Dynamic.ExpandoObject
Assembly: cs.temp.dll.dll
Syntax
public class Closure : RefIdObject, IScriptPrivateResource
Properties
EntryPointByteCodeLocation
Gets the entry point location in bytecode .
Declaration
public int EntryPointByteCodeLocation { get; }
Property Value
System.Int32
|
OwnerScript
Gets the script owning this function
Declaration
public Script OwnerScript { get; }
Property Value
Script
|
Implements
Methods
Call()
Calls this function with the specified args
Declaration
public DynValue Call()
Returns
DynValue
|
Exceptions
System.ArgumentException
Thrown if function is not of DataType.Function |
Call(DynValue[])
Calls this function with the specified args
Declaration
public DynValue Call(params DynValue[] args)
Parameters
DynValue[]
args
The arguments to pass to the function. |
Returns
DynValue
|
Exceptions
System.ArgumentException
Thrown if function is not of DataType.Function |
Call(Object[])
Calls this function with the specified args
Declaration
public DynValue Call(params object[] args)
Parameters
System.Object[]
args
The arguments to pass to the function. |
Returns
DynValue
|
Exceptions
System.ArgumentException
Thrown if function is not of DataType.Function |
GetDelegate()
Gets a delegate wrapping calls to this scripted function
Declaration
public ScriptFunctionDelegate GetDelegate()
Returns
ScriptFunctionDelegate
|
GetDelegate<T>()
Gets a delegate wrapping calls to this scripted function
Declaration
public ScriptFunctionDelegate<T> GetDelegate<T>()
Returns
ScriptFunctionDelegate<T>
|
Type Parameters
T
The type of return value of the delegate. |
GetUpvalue(Int32)
Gets the value of an upvalue. To set the value, use GetUpvalue(idx).Assign(...);
Declaration
public DynValue GetUpvalue(int idx)
Parameters
System.Int32
idx
The index of the upvalue. |
Returns
DynValue
The value of an upvalue |
GetUpvalueName(Int32)
Gets the name of the specified upvalue.
Declaration
public string GetUpvalueName(int idx)
Parameters
System.Int32
idx
The index of the upvalue. |
Returns
System.String
The upvalue name |
GetUpvaluesCount()
Gets the number of upvalues in this closure
Declaration
public int GetUpvaluesCount()
Returns
System.Int32
The number of upvalues in this closure |
GetUpvaluesType()
Gets the type of the upvalues contained in this closure
Declaration
public Closure.UpvaluesType GetUpvaluesType()
Returns
Closure.UpvaluesType
|