C# Class Jurassic.Library.ClrStubFunction

Represents a function that is implemented with a .NET static method. Faster, but less flexible version of ClrFunction. Now used by all the built-in constructors and functions.
Inheritance: FunctionInstance
Mostrar archivo Open project: paulbartrum/jurassic Class Usage Examples

Public Methods

Method Description
CallLateBound ( object thisObject ) : object

Calls this function, passing in the given "this" value and zero or more arguments.

ClrStubFunction ( ObjectInstance prototype, string name, int length, Func call ) : System

Creates a new instance of a function which calls a .NET method.

ConstructLateBound ( ) : ObjectInstance

Creates an object, using this function as the constructor.

Protected Methods

Method Description
ClrStubFunction ( ObjectInstance prototype, string name, int length, ObjectInstance instancePrototype, Func construct, Func call ) : System

Creates a new constructor function.

InitializeConstructorProperties ( List properties, string name, int length, ObjectInstance instancePrototype ) : void

Adds properties needed by the function to the list of properties.

Private Methods

Method Description
ClrStubFunction ( ObjectInstance prototype, Func construct, Func call ) : System

Creates a new constructor function.

ClrStubFunction ( ObjectInstance prototype, Func call ) : System

Creates a function which calls a .NET method, with no name or length.

Method Details

CallLateBound() public method

Calls this function, passing in the given "this" value and zero or more arguments.
public CallLateBound ( object thisObject ) : object
thisObject object The value of the "this" keyword within the function.
return object

ClrStubFunction() public method

Creates a new instance of a function which calls a .NET method.
public ClrStubFunction ( ObjectInstance prototype, string name, int length, Func call ) : System
prototype ObjectInstance The next object in the prototype chain.
name string The name of the function.
length int The "typical" number of arguments expected by the function.
call Func The delegate to call when calling the JS method.
return System

ClrStubFunction() protected method

Creates a new constructor function.
protected ClrStubFunction ( ObjectInstance prototype, string name, int length, ObjectInstance instancePrototype, Func construct, Func call ) : System
prototype ObjectInstance The next object in the prototype chain.
name string The name of the function.
length int The "typical" number of arguments expected by the function.
instancePrototype ObjectInstance The value of the "prototype" property.
construct Func The delegate to call when calling the JS method as a constructor.
call Func The delegate to call when function is called.
return System

ConstructLateBound() public method

Creates an object, using this function as the constructor.
public ConstructLateBound ( ) : ObjectInstance
return ObjectInstance

InitializeConstructorProperties() protected method

Adds properties needed by the function to the list of properties.
protected InitializeConstructorProperties ( List properties, string name, int length, ObjectInstance instancePrototype ) : void
properties List The list of properties to add to.
name string The name of the function.
length int The "typical" number of arguments expected by the function.
instancePrototype ObjectInstance The value of the "prototype" property.
return void