C# Class PERWAPI.FieldDef

Descriptor for a field defined in a class of an assembly/module
Inheritance: Field
Mostrar archivo Open project: xored/f4 Class Usage Examples

Public Methods

Method Description
AddDataValue ( DataConstant val ) : void

Add an initial value for this field (at dataLabel) (.data)

AddFieldAttr ( FieldAttr fa ) : void

Add an attribute(s) to this field

AddValue ( Constant val ) : void

Add a value for this field

GetDataValue ( ) : DataConstant

Get the value for this data constant

GetFieldAttr ( ) : FieldAttr
GetMarshalType ( ) : NativeType
GetOffset ( ) : uint

Return the offset for this data constant

GetValue ( ) : Constant

Retrieve the initial value for this field

HasOffset ( ) : bool

Does this data constant have an offset?

MakeRefOf ( ) : FieldRef

Create the FieldRef equivalent to this FieldDef. If one does not exist then create it.

RefOf ( ) : FieldRef

Get the FieldRef equivalent to this FieldDef. Assumes that one already exists.

RemoveDataValue ( ) : void

Delete the value of this data constant

RemoveMarshalType ( ) : void
RemoveOffset ( ) : void

Delete the offset of this data constant

RemoveValue ( ) : void

Remove the initial value from this field

SetFieldAttr ( FieldAttr fa ) : void
SetMarshalType ( NativeType mType ) : void

Set the marshalling info for a field

SetOffset ( uint offs ) : void

Set the offset of the field. Used for sequential or explicit classes. (.field [offs])

Private Methods

Method Description
BuildCILInfo ( CILWriter output ) : void
BuildTables ( MetaDataOut md ) : void
ChangeRefsToDefs ( ClassDef newPar, ClassDef oldTypes ) : void
FieldDef ( FieldAttr attrSet, string name, Type fType, ClassDef paren ) : System
FieldDef ( FieldAttr attrSet, string name, Type fType, ClassSpec paren ) : System
FieldDef ( PEReader buff ) : System
FieldDef ( string name, Type fType, ClassDef paren ) : System
GetCodedIx ( CIx code ) : uint
GetFieldRefs ( PEReader buff, uint num, ClassRef parent ) : void
GetScope ( ) : PEFile
Read ( PEReader buff, TableRow fields ) : void
Resolve ( PEReader buff, uint fIx ) : void
SetParent ( ClassDef paren ) : void
Size ( MetaData md ) : uint
Write ( CILWriter output ) : void
Write ( PEWriter output ) : void
isDef ( ) : bool

Method Details

AddDataValue() public method

Add an initial value for this field (at dataLabel) (.data)
public AddDataValue ( DataConstant val ) : void
val DataConstant the value for the field
return void

AddFieldAttr() public method

Add an attribute(s) to this field
public AddFieldAttr ( FieldAttr fa ) : void
fa FieldAttr the attribute(s) to be added
return void

AddValue() public method

Add a value for this field
public AddValue ( Constant val ) : void
val Constant the value for the field
return void

GetDataValue() public method

Get the value for this data constant
public GetDataValue ( ) : DataConstant
return DataConstant

GetFieldAttr() public method

public GetFieldAttr ( ) : FieldAttr
return FieldAttr

GetMarshalType() public method

public GetMarshalType ( ) : NativeType
return NativeType

GetOffset() public method

Return the offset for this data constant
public GetOffset ( ) : uint
return uint

GetValue() public method

Retrieve the initial value for this field
public GetValue ( ) : Constant
return Constant

HasOffset() public method

Does this data constant have an offset?
public HasOffset ( ) : bool
return bool

MakeRefOf() public method

Create the FieldRef equivalent to this FieldDef. If one does not exist then create it.
public MakeRefOf ( ) : FieldRef
return FieldRef

RefOf() public method

Get the FieldRef equivalent to this FieldDef. Assumes that one already exists.
public RefOf ( ) : FieldRef
return FieldRef

RemoveDataValue() public method

Delete the value of this data constant
public RemoveDataValue ( ) : void
return void

RemoveMarshalType() public method

public RemoveMarshalType ( ) : void
return void

RemoveOffset() public method

Delete the offset of this data constant
public RemoveOffset ( ) : void
return void

RemoveValue() public method

Remove the initial value from this field
public RemoveValue ( ) : void
return void

SetFieldAttr() public method

public SetFieldAttr ( FieldAttr fa ) : void
fa FieldAttr
return void

SetMarshalType() public method

Set the marshalling info for a field
public SetMarshalType ( NativeType mType ) : void
mType NativeType
return void

SetOffset() public method

Set the offset of the field. Used for sequential or explicit classes. (.field [offs])
public SetOffset ( uint offs ) : void
offs uint field offset
return void