C# Class PERWAPI.MethodDef

Descriptor for a method defined in THIS assembly/module IL .method
Inheritance: Method
Show file Open project: xored/f4 Class Usage Examples

Public Methods

Method Description
AddImplAttribute ( ImplAttr ia ) : void

Add some implementation attributes to this method descriptor

AddLocals ( Local locals, bool initLocals ) : void

Add local variables to this method

AddMethAttribute ( MethAttr ma ) : void

Add some attributes to this method descriptor

AddPInvokeInfo ( ModuleRef scope, string methName, PInvokeAttr callAttr ) : void
AddSecurity ( DeclSecurity sec ) : void
AddSecurity ( SecurityAction act, byte permissionSet ) : void
CreateCodeBuffer ( ) : CILInstructions

Create a code buffer for this method to add the IL instructions to

DeclareEntryPoint ( ) : void

Mark this method as having an entry point

GetCodeBuffer ( ) : CILInstructions

Get the CIL code buffer for this method

GetImplAttributes ( ) : ImplAttr

Property to get and set the implementation attributes for this method

GetLocals ( ) : Local[]

Retrieve the locals for this method

GetMaxStack ( ) : int

Retrieve the maximum size of the stack for the code of this method

GetMethAttributes ( ) : MethAttr

Property to get and set the attributes for this method

GetParams ( ) : PERWAPI.Param[]

Get the parameters of this method

GetSecurity ( ) : PERWAPI.DeclSecurity[]
GetVarArgSignature ( ) : MethodRef
HasEntryPoint ( ) : bool

Does this method have an entrypoint?

MakeRefOf ( ) : MethodRef

Get the MethodRef equivalent to this MethodDef. If one does not exist, then create it.

MakeVarArgSignature ( Type optPars ) : MethodRef

Make a method reference descriptor for this method to be used as a callsite signature for this vararg method

RefOf ( ) : MethodRef

Get the MethodRef equivalent to this MethodDef. Assumes that one has been created.

RemoveEntryPoint ( ) : void

Remove the entry point from this method

RemoveLocals ( ) : void

Remove all the locals from this method

RemovePInvokeInfo ( ) : void
RemoveSecurity ( ) : void
SetImplAttributes ( ImplAttr ia ) : void
SetMaxStack ( int maxStack ) : void

Set the maximum stack height for this method

SetMethAttributes ( MethAttr ma ) : void
SetParams ( Param pars ) : void

Set the parameters for this method

Private Methods

Method Description
AddGenericsToTable ( MetaDataOut md ) : void
AddPInvokeInfo ( ImplMap impl ) : void
AddVarArgSig ( MethodRef meth ) : void
BuildCILInfo ( CILWriter output ) : void
BuildSignatures ( MetaDataOut md ) : void
BuildTables ( MetaDataOut md ) : void
ChangeRefsToDefs ( ClassDef newPar, ClassDef oldTypes ) : void
DoCode ( PEReader buff ) : void
DoPars ( PEReader buff, bool resolvePars ) : void
GetCodedIx ( CIx code ) : uint
GetMethodRefs ( PEReader buff, uint num, ClassRef parent ) : void
GetScope ( ) : PEFile
InsertGenericParam ( GenericParam genPar ) : void
IsPublicOrProtected ( ushort methFlags ) : bool
MethodDef ( ClassDef paren, MethSig mSig, Param pars ) : System
MethodDef ( ClassSpec paren, MethSig mSig, Param pars ) : System
MethodDef ( PEReader buff ) : System
MethodDef ( string name, Type retType, Param pars, ClassDef paren ) : System
Read ( PEReader buff, TableRow methDefs ) : void
Resolve ( PEReader buff ) : void
Size ( MetaData md ) : uint
TypeSig ( MemoryStream sigStream ) : void
Write ( CILWriter output ) : void
Write ( PEWriter output ) : void
isDef ( ) : bool

Method Details

AddImplAttribute() public method

Add some implementation attributes to this method descriptor
public AddImplAttribute ( ImplAttr ia ) : void
ia ImplAttr the attributes to be added
return void

AddLocals() public method

Add local variables to this method
public AddLocals ( Local locals, bool initLocals ) : void
locals Local the locals to be added
initLocals bool are locals initialised to default values
return void

AddMethAttribute() public method

Add some attributes to this method descriptor
public AddMethAttribute ( MethAttr ma ) : void
ma MethAttr the attributes to be added
return void

AddPInvokeInfo() public method

public AddPInvokeInfo ( ModuleRef scope, string methName, PInvokeAttr callAttr ) : void
scope ModuleRef
methName string
callAttr PInvokeAttr
return void

AddSecurity() public method

public AddSecurity ( DeclSecurity sec ) : void
sec DeclSecurity
return void

AddSecurity() public method

public AddSecurity ( SecurityAction act, byte permissionSet ) : void
act SecurityAction
permissionSet byte
return void

CreateCodeBuffer() public method

Create a code buffer for this method to add the IL instructions to
public CreateCodeBuffer ( ) : CILInstructions
return CILInstructions

DeclareEntryPoint() public method

Mark this method as having an entry point
public DeclareEntryPoint ( ) : void
return void

GetCodeBuffer() public method

Get the CIL code buffer for this method
public GetCodeBuffer ( ) : CILInstructions
return CILInstructions

GetImplAttributes() public method

Property to get and set the implementation attributes for this method
public GetImplAttributes ( ) : ImplAttr
return ImplAttr

GetLocals() public method

Retrieve the locals for this method
public GetLocals ( ) : Local[]
return Local[]

GetMaxStack() public method

Retrieve the maximum size of the stack for the code of this method
public GetMaxStack ( ) : int
return int

GetMethAttributes() public method

Property to get and set the attributes for this method
public GetMethAttributes ( ) : MethAttr
return MethAttr

GetParams() public method

Get the parameters of this method
public GetParams ( ) : PERWAPI.Param[]
return PERWAPI.Param[]

GetSecurity() public method

public GetSecurity ( ) : PERWAPI.DeclSecurity[]
return PERWAPI.DeclSecurity[]

GetVarArgSignature() public method

public GetVarArgSignature ( ) : MethodRef
return MethodRef

HasEntryPoint() public method

Does this method have an entrypoint?
public HasEntryPoint ( ) : bool
return bool

MakeRefOf() public method

Get the MethodRef equivalent to this MethodDef. If one does not exist, then create it.
public MakeRefOf ( ) : MethodRef
return MethodRef

MakeVarArgSignature() public method

Make a method reference descriptor for this method to be used as a callsite signature for this vararg method
public MakeVarArgSignature ( Type optPars ) : MethodRef
optPars Type the optional pars for the vararg method call
return MethodRef

RefOf() public method

Get the MethodRef equivalent to this MethodDef. Assumes that one has been created.
public RefOf ( ) : MethodRef
return MethodRef

RemoveEntryPoint() public method

Remove the entry point from this method
public RemoveEntryPoint ( ) : void
return void

RemoveLocals() public method

Remove all the locals from this method
public RemoveLocals ( ) : void
return void

RemovePInvokeInfo() public method

public RemovePInvokeInfo ( ) : void
return void

RemoveSecurity() public method

public RemoveSecurity ( ) : void
return void

SetImplAttributes() public method

public SetImplAttributes ( ImplAttr ia ) : void
ia ImplAttr
return void

SetMaxStack() public method

Set the maximum stack height for this method
public SetMaxStack ( int maxStack ) : void
maxStack int the maximum height of the stack
return void

SetMethAttributes() public method

public SetMethAttributes ( MethAttr ma ) : void
ma MethAttr
return void

SetParams() public method

Set the parameters for this method
public SetParams ( Param pars ) : void
pars Param Descriptors of the parameters for this method
return void