C# Class PEAPI.ModuleRef

Descriptor for another module in THIS assembly
Inheritance: ResolutionScope, IExternRef
Mostra file Open project: kumpera/mono Class Usage Examples

Public Methods

Method Description
AddClass ( string nsName, string name ) : ClassRef

Add a class to this external module. This is a class declared in another module of THIS assembly.

AddExternClass ( TypeAttr attrSet, string nsName, string name, FileRef declFile, bool isValueClass ) : ExternClassRef

Add a class which is declared public in this external module of THIS assembly. This class will be exported from this assembly. The ilasm syntax for this is .extern class

AddField ( string name, Type fType ) : FieldRef

Add a field in another module

AddMethod ( string name, Type retType, Type pars ) : MethodRef

Add a "global" method in another module

AddValueClass ( string nsName, string name ) : ClassRef

Add a value class to this module. This is a class declared in another module of THIS assembly.

AddVarArgMethod ( string name, Type retType, Type pars, Type optPars ) : MethodRef

Add a vararg method to this class

MakeFile ( byte hashBytes, bool hasMetaData, bool entryPoint ) : FileRef

Make a file descriptor to correspond to this module. The file descriptor will have the same name as the module descriptor

Private Methods

Method Description
GetCodedIx ( CIx code ) : uint
ModuleRef ( MetaData md, string name ) : System
Size ( MetaData md ) : uint
Write ( PEAPI.FileImage output ) : void

Method Details

AddClass() public method

Add a class to this external module. This is a class declared in another module of THIS assembly.
public AddClass ( string nsName, string name ) : ClassRef
nsName string name space name
name string class name
return ClassRef

AddExternClass() public method

Add a class which is declared public in this external module of THIS assembly. This class will be exported from this assembly. The ilasm syntax for this is .extern class
public AddExternClass ( TypeAttr attrSet, string nsName, string name, FileRef declFile, bool isValueClass ) : ExternClassRef
attrSet TypeAttr attributes of the class to be exported
nsName string name space name
name string external class name
declFile FileRef the file where the class is declared
isValueClass bool is this class a value type?
return ExternClassRef

AddField() public method

Add a field in another module
public AddField ( string name, Type fType ) : FieldRef
name string field name
fType Type field type
return FieldRef

AddMethod() public method

Add a "global" method in another module
public AddMethod ( string name, Type retType, Type pars ) : MethodRef
name string method name
retType Type return type
pars Type method parameter types
return MethodRef

AddValueClass() public method

Add a value class to this module. This is a class declared in another module of THIS assembly.
public AddValueClass ( string nsName, string name ) : ClassRef
nsName string name space name
name string class name
return ClassRef

AddVarArgMethod() public method

Add a vararg method to this class
public AddVarArgMethod ( string name, Type retType, Type pars, Type optPars ) : MethodRef
name string method name
retType Type return type
pars Type parameter types
optPars Type optional param types for this vararg method
return MethodRef

MakeFile() public method

Make a file descriptor to correspond to this module. The file descriptor will have the same name as the module descriptor
public MakeFile ( byte hashBytes, bool hasMetaData, bool entryPoint ) : FileRef
hashBytes byte the hash of the file
hasMetaData bool the file contains metadata
entryPoint bool the program entry point is in this file
return FileRef