Class ObjectCallbackMemberDescriptor
Member descriptor which allows to define new members which behave similarly to class instance members
Inherited Members
Namespace: System.Dynamic.ExpandoObject
Assembly: cs.temp.dll.dll
Syntax
public class ObjectCallbackMemberDescriptor : FunctionMemberDescriptorBase
Constructors
ObjectCallbackMemberDescriptor(String)
Initializes a new instance of the ObjectCallbackMemberDescriptor class. A new member descriptor is defined, which is a function taking no parameters and returning void, doing nothing.
Declaration
public ObjectCallbackMemberDescriptor(string funcName)
Parameters
|
System.String
funcName
Name of the function. |
ObjectCallbackMemberDescriptor(String, Func<Object, ScriptExecutionContext, CallbackArguments, Object>)
Initializes a new instance of the ObjectCallbackMemberDescriptor class. The function described by descriptors created by this callback are defined as if they take no parameters and thus don't support overload resolution well (unless they really take no parameters) but can freely be used if no overload resolution is required.
Declaration
public ObjectCallbackMemberDescriptor(string funcName, Func<object, ScriptExecutionContext, CallbackArguments, object> callBack)
Parameters
|
System.String
funcName
Name of the function. |
|
Func<System.Object, ScriptExecutionContext, CallbackArguments, System.Object>
callBack
The callback function. |
ObjectCallbackMemberDescriptor(String, Func<Object, ScriptExecutionContext, CallbackArguments, Object>, ParameterDescriptor[])
Initializes a new instance of the ObjectCallbackMemberDescriptor class. Members defined with this constructor will support overload resolution.
Declaration
public ObjectCallbackMemberDescriptor(string funcName, Func<object, ScriptExecutionContext, CallbackArguments, object> callBack, ParameterDescriptor[] parameters)
Parameters
|
System.String
funcName
Name of the function. |
|
Func<System.Object, ScriptExecutionContext, CallbackArguments, System.Object>
callBack
The call back. |
|
ParameterDescriptor[]
parameters
The parameters. |
Methods
Execute(Script, Object, ScriptExecutionContext, CallbackArguments)
The internal callback which actually executes the method
Declaration
public override DynValue Execute(Script script, object obj, ScriptExecutionContext context, CallbackArguments args)
Parameters
|
Script
script
The script. |
|
System.Object
obj
The object. |
|
ScriptExecutionContext
context
The context. |
|
CallbackArguments
args
The arguments. |
Returns
|
DynValue
|