C# Class Jurassic.Compiler.Binder

Show file Open project: paulbartrum/jurassic Class Usage Examples

Public Methods

Method Description
Call ( ScriptEngine engine, object thisObject ) : object

Calls the bound method.

CreateDelegate ( int argumentCount ) : BinderDelegate

Creates a delegate that does type conversion and calls the bound method.

This method caches the result so calling CreateDelegate a second time with the same parameter count will be markedly quicker.

ToString ( ) : string

Returns a textual representation of this object.

Protected Methods

Method Description
GenerateStub ( ILGenerator generator, int argumentCount ) : void

Generates a method that does type conversion and calls the bound method.

Private Methods

Method Description
CreateDelegateCore ( int argumentCount ) : BinderDelegate

Creates a delegate that does type conversion and calls the bound method.

No caching of the result occurs.

Method Details

Call() public method

Calls the bound method.
public Call ( ScriptEngine engine, object thisObject ) : object
engine ScriptEngine The associated script engine.
thisObject object The value of the this keyword.
return object

CreateDelegate() public method

Creates a delegate that does type conversion and calls the bound method.
This method caches the result so calling CreateDelegate a second time with the same parameter count will be markedly quicker.
public CreateDelegate ( int argumentCount ) : BinderDelegate
argumentCount int The number of arguments that will be passed to the delegate.
return BinderDelegate

GenerateStub() protected abstract method

Generates a method that does type conversion and calls the bound method.
protected abstract GenerateStub ( ILGenerator generator, int argumentCount ) : void
generator ILGenerator The ILGenerator used to output the body of the method.
argumentCount int The number of arguments that will be passed to the delegate.
return void

ToString() public method

Returns a textual representation of this object.
public ToString ( ) : string
return string