C# Класс 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.
Наследование: FunctionInstance
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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.

Защищенные методы

Метод Описание
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.

Приватные методы

Метод Описание
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.

Описание методов

CallLateBound() публичный Метод

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.
Результат object

ClrStubFunction() публичный Метод

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.
Результат System

ClrStubFunction() защищенный Метод

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.
Результат System

ConstructLateBound() публичный Метод

Creates an object, using this function as the constructor.
public ConstructLateBound ( ) : ObjectInstance
Результат ObjectInstance

InitializeConstructorProperties() защищенный Метод

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.
Результат void