C# Class PERWAPI.Module

Descriptor for a module
Inheritance: DefiningScope
Mostrar archivo Open project: xored/f4

Protected Properties

Property Type Description
defaultClass ClassDef
ismscorlib bool
resources ArrayList

Public Methods

Method Description
AddClass ( TypeAttr attrSet, string nsName, string name ) : ClassDef

Add a class to this Module If this class already exists, throw an exception

AddClass ( TypeAttr attrSet, string nsName, string name, Class superType ) : ClassDef

Add a class to this PE File

AddClass ( ClassDef aClass ) : void

Add a class to this module If this class already exists, throw an exception

AddField ( FieldAttr attrSet, string name, Type fType ) : FieldDef

Add a "global" field to this module

AddField ( string name, Type fType ) : FieldDef

Add a "global" field to this module

AddField ( FieldDef fld ) : void

Add a "global" field to this module

AddMethod ( MethAttr mAtts, ImplAttr iAtts, string name, GenericParam genPars, Type retType, Param pars ) : MethodDef

Add a "global" method to this module

AddMethod ( MethAttr mAtts, ImplAttr iAtts, string name, Type retType, Param pars ) : MethodDef

Add a "global" method to this module

AddMethod ( string name, GenericParam genPars, Type retType, Param pars ) : MethodDef

Add a "global" method to this module

AddMethod ( string name, Type retType, Param pars ) : MethodDef

Add a "global" method to this module

AddMethod ( MethodDef meth ) : void

Add a "global" method to this module

AddValueClass ( TypeAttr attrSet, string nsName, string name ) : ClassDef

Add a class which extends System.ValueType to this Module If this class already exists, throw an exception

GetClass ( string name ) : ClassDef

Get a class of this module, if no class exists, return null

GetClass ( string nsName, string name ) : ClassDef

Get a class of this module, if no class exists, return null

GetClasses ( ) : PERWAPI.ClassDef[]

Get all the classes of this module

GetField ( string name ) : FieldDef

Get a field of this module, if it exists

GetFields ( ) : PERWAPI.FieldDef[]

Get all the fields of this module

GetMVid ( ) : System.Guid
GetMethod ( string name ) : MethodDef

Get a method of this module, if it exists

GetMethod ( string name, Type parTypes ) : MethodDef

Get a method of this module, if it exists

GetMethods ( ) : PERWAPI.MethodDef[]

Get all the methods of this module

GetMethods ( string name ) : PERWAPI.MethodDef[]

Get all the methods of this module with a specified name

MakeRefOf ( ) : ModuleRef

Make a ModuleRef for this Module.

RemoveMethod ( MethodDef meth ) : void

Delete a method from this module

RemoveMethod ( int ix ) : void

Delete a method from this module

RemoveMethod ( string name ) : void

Delete a method from this module

RemoveMethod ( string name, Type parTypes ) : void

Delete a method from this module

SetMVid ( Guid guid ) : void
SetName ( string newName ) : void

Set the name for this module

Private Methods

Method Description
BuildTables ( MetaDataOut md ) : void
GetBaseName ( string name ) : string
GetCodedIx ( CIx code ) : uint
Module ( string mName ) : System
Read ( PEReader buff ) : void
ReadModuleRef ( PEReader buff ) : ModuleRef
SetDefaultClass ( ClassDef dClass ) : void
Size ( MetaData md ) : uint
Write ( PEWriter output ) : void
isDefaultClass ( ClassDef aClass ) : bool
isMSCorLib ( ) : bool

Method Details

AddClass() public method

Add a class to this Module If this class already exists, throw an exception
public AddClass ( TypeAttr attrSet, string nsName, string name ) : ClassDef
attrSet TypeAttr attributes of this class
nsName string name space name
name string class name
return ClassDef

AddClass() public method

Add a class to this PE File
public AddClass ( TypeAttr attrSet, string nsName, string name, Class superType ) : ClassDef
attrSet TypeAttr attributes of this class
nsName string name space name
name string class name
superType Class super type of this class (extends)
return ClassDef

AddClass() public method

Add a class to this module If this class already exists, throw an exception
public AddClass ( ClassDef aClass ) : void
aClass ClassDef The class to be added
return void

AddField() public method

Add a "global" field to this module
public AddField ( FieldAttr attrSet, string name, Type fType ) : FieldDef
attrSet FieldAttr attributes of this field
name string field name
fType Type field type
return FieldDef

AddField() public method

Add a "global" field to this module
public AddField ( string name, Type fType ) : FieldDef
name string field name
fType Type field type
return FieldDef

AddField() public method

Add a "global" field to this module
public AddField ( FieldDef fld ) : void
fld FieldDef The field to be added
return void

AddMethod() public method

Add a "global" method to this module
public AddMethod ( MethAttr mAtts, ImplAttr iAtts, string name, GenericParam genPars, Type retType, Param pars ) : MethodDef
mAtts MethAttr method attributes
iAtts ImplAttr method implementation attributes
name string method name
genPars GenericParam generic parameters
retType Type return type
pars Param method parameters
return MethodDef

AddMethod() public method

Add a "global" method to this module
public AddMethod ( MethAttr mAtts, ImplAttr iAtts, string name, Type retType, Param pars ) : MethodDef
mAtts MethAttr method attributes
iAtts ImplAttr method implementation attributes
name string method name
retType Type return type
pars Param method parameters
return MethodDef

AddMethod() public method

Add a "global" method to this module
public AddMethod ( string name, GenericParam genPars, Type retType, Param pars ) : MethodDef
name string method name
genPars GenericParam generic parameters
retType Type return type
pars Param method parameters
return MethodDef

AddMethod() public method

Add a "global" method to this module
public AddMethod ( string name, Type retType, Param pars ) : MethodDef
name string method name
retType Type return type
pars Param method parameters
return MethodDef

AddMethod() public method

Add a "global" method to this module
public AddMethod ( MethodDef meth ) : void
meth MethodDef The method to be added
return void

AddValueClass() public method

Add a class which extends System.ValueType to this Module If this class already exists, throw an exception
public AddValueClass ( TypeAttr attrSet, string nsName, string name ) : ClassDef
attrSet TypeAttr attributes of this class
nsName string name space name
name string class name
return ClassDef

GetClass() public method

Get a class of this module, if no class exists, return null
public GetClass ( string name ) : ClassDef
name string The name of the class to get
return ClassDef

GetClass() public method

Get a class of this module, if no class exists, return null
public GetClass ( string nsName, string name ) : ClassDef
nsName string The namespace of the class
name string The name of the class to get
return ClassDef

GetClasses() public method

Get all the classes of this module
public GetClasses ( ) : PERWAPI.ClassDef[]
return PERWAPI.ClassDef[]

GetField() public method

Get a field of this module, if it exists
public GetField ( string name ) : FieldDef
name string The name of the field
return FieldDef

GetFields() public method

Get all the fields of this module
public GetFields ( ) : PERWAPI.FieldDef[]
return PERWAPI.FieldDef[]

GetMVid() public method

public GetMVid ( ) : System.Guid
return System.Guid

GetMethod() public method

Get a method of this module, if it exists
public GetMethod ( string name ) : MethodDef
name string The name of the method to get
return MethodDef

GetMethod() public method

Get a method of this module, if it exists
public GetMethod ( string name, Type parTypes ) : MethodDef
name string The name of the method to get
parTypes Type The signature of the method
return MethodDef

GetMethods() public method

Get all the methods of this module
public GetMethods ( ) : PERWAPI.MethodDef[]
return PERWAPI.MethodDef[]

GetMethods() public method

Get all the methods of this module with a specified name
public GetMethods ( string name ) : PERWAPI.MethodDef[]
name string The name of the method(s)
return PERWAPI.MethodDef[]

MakeRefOf() public method

Make a ModuleRef for this Module.
public MakeRefOf ( ) : ModuleRef
return ModuleRef

RemoveMethod() public method

Delete a method from this module
public RemoveMethod ( MethodDef meth ) : void
meth MethodDef The method to be deleted
return void

RemoveMethod() public method

Delete a method from this module
public RemoveMethod ( int ix ) : void
ix int The index of the method (in the method array /// returned by GetMethods()) to be deleted
return void

RemoveMethod() public method

Delete a method from this module
public RemoveMethod ( string name ) : void
name string The name of the method to be deleted
return void

RemoveMethod() public method

Delete a method from this module
public RemoveMethod ( string name, Type parTypes ) : void
name string The name of the method to be deleted
parTypes Type The signature of the method to be deleted
return void

SetMVid() public method

public SetMVid ( Guid guid ) : void
guid Guid
return void

SetName() public method

Set the name for this module
public SetName ( string newName ) : void
newName string New module name
return void

Property Details

defaultClass protected_oe property

The default class "Module" for globals
protected ClassDef defaultClass
return ClassDef

ismscorlib protected_oe property

Is this module a .dll or .exe Is this module mscorlib.dll
protected bool ismscorlib
return bool

resources protected_oe property

Managed resources for this module
protected ArrayList resources
return ArrayList