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
Afficher le fichier Open project: paulbartrum/jurassic Class Usage Examples

Méthodes publiques

Méthode 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.

Méthodes protégées

Méthode 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

Méthode 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 méthode

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.
Résultat object

ClrStubFunction() public méthode

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.
Résultat System

ClrStubFunction() protected méthode

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.
Résultat System

ConstructLateBound() public méthode

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

InitializeConstructorProperties() protected méthode

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.
Résultat void