C# Класс Fanx.Emit.Emitter

Emitter.
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
Emitter ( ) : System

Uninitialized Emitter - must call init().

Emitter ( string assemblyName ) : System

Convenience for init().

Emitter ( string assemblyName, string stubFileName ) : System
addToMethodMap ( string className, string name, string paramTypes, MethodDef def ) : void

Add a MethodDef into the lookup table.

commit ( ) : byte[]

Commit the current definition to the PE file.

emitClass ( string baseQName, string qname, string interfaces, TypeAttr attr ) : void

Define a new class to emit for this assembly. This class becomes the 'current' class, where subsequent EmitMethod and EmitField calls will popuate this class.

emitField ( string name, string type, FieldAttr attr ) : void

Define a new field to emit for the current class.

emitMethod ( string name, string retType, string paramNames, string paramTypes, MethAttr attr, string localNames, string localTypes ) : CILInstructions

Define a new method to emit for the current class.

init ( string assemblyName ) : void

Initialize an Emitter to generate types for an assembly with the given name.

init ( string assemblyName, string stubName ) : void

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

Метод Описание
findField ( string qname, string fieldName, string fieldType ) : Field

Find the Field for this field on the given type.

findMethod ( string qname, string methodName, string paramTypes, string returnType ) : Method

Find the Method for this method on the given type.

findType ( string qname ) : Type

Find the Type instance for this fully qualified type name.

getMethodKey ( string qname, string methodName, string paramTypes ) : string

Return the key for this method in the method lookup table.

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

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

Uninitialized Emitter - must call init().
public Emitter ( ) : System
Результат System

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

Convenience for init().
public Emitter ( string assemblyName ) : System
assemblyName string
Результат System

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

public Emitter ( string assemblyName, string stubFileName ) : System
assemblyName string
stubFileName string
Результат System

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

Add a MethodDef into the lookup table.
public addToMethodMap ( string className, string name, string paramTypes, MethodDef def ) : void
className string
name string
paramTypes string
def PERWAPI.MethodDef
Результат void

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

Commit the current definition to the PE file.
public commit ( ) : byte[]
Результат byte[]

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

Define a new class to emit for this assembly. This class becomes the 'current' class, where subsequent EmitMethod and EmitField calls will popuate this class.
public emitClass ( string baseQName, string qname, string interfaces, TypeAttr attr ) : void
baseQName string
qname string
interfaces string
attr TypeAttr
Результат void

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

Define a new field to emit for the current class.
public emitField ( string name, string type, FieldAttr attr ) : void
name string
type string
attr FieldAttr
Результат void

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

Define a new method to emit for the current class.
public emitMethod ( string name, string retType, string paramNames, string paramTypes, MethAttr attr, string localNames, string localTypes ) : CILInstructions
name string
retType string
paramNames string
paramTypes string
attr MethAttr
localNames string
localTypes string
Результат PERWAPI.CILInstructions

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

Initialize an Emitter to generate types for an assembly with the given name.
public init ( string assemblyName ) : void
assemblyName string
Результат void

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

public init ( string assemblyName, string stubName ) : void
assemblyName string
stubName string
Результат void