C# Класс Jurassic.Compiler.ClrBinder

Binds to a method group using pretty standard .NET rules. The main difference from the JSBinder is that the number of arguments must be correct. Additionally, it is possible to bind to overloaded methods with the same number of arguments.
Наследование: MethodBinder
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
ClrBinder ( IEnumerable targetMethods ) : System

Creates a new ClrBinder instance.

ClrBinder ( IEnumerable targetMethods ) : System

Creates a new ClrBinder instance.

ClrBinder ( MethodBase targetMethod ) : System

Creates a new ClrBinder instance.

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

Метод Описание
GenerateStub ( ILGenerator generator, int argumentCount ) : void

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

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

Метод Описание
EmitConversionToObject ( ILGenerator generator, Type fromType ) : void

Pops the value on the stack, converts it to an object, then pushes the result onto the stack.

EmitConversionToType ( ILGenerator generator, Type toType, bool convertToAddress ) : void

Pops the value on the stack, converts it from an object to the given type, then pushes the result onto the stack.

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

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

Creates a new ClrBinder instance.
public ClrBinder ( IEnumerable targetMethods ) : System
targetMethods IEnumerable An enumerable list of methods to bind to.
Результат System

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

Creates a new ClrBinder instance.
public ClrBinder ( IEnumerable targetMethods ) : System
targetMethods IEnumerable An enumerable list of methods to bind to.
Результат System

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

Creates a new ClrBinder instance.
public ClrBinder ( MethodBase targetMethod ) : System
targetMethod System.Reflection.MethodBase A method to bind to.
Результат System

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

Generates a method that does type conversion and calls the bound method.
protected 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.
Результат void