C# Class PEAPI.ClassDef

The descriptor for a class defined in the IL (.class) in the current assembly/module
Inheritance: Class
Exibir arquivo Open project: kumpera/mono Class Usage Examples

Public Methods

Method Description
AddAttribute ( TypeAttr ta ) : void

Add an attribute to this class

AddEvent ( string name, Type eType ) : Event

Add an event to this class

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

Add a field to this class

AddField ( string name, Type fType ) : FieldDef

Add a field to this class

AddGenericParameter ( short index, string name ) : GenericParameter

Add a named generic type parameter

AddGenericParameter ( short index, string name, GenericParamAttributes attr ) : GenericParameter

Add a named generic type parameter with attributes

AddImplementedInterface ( Class iFace ) : void

Add an interface that is implemented by this class

AddLayoutInfo ( int packSize, int classSize ) : void

Add layout information for this class. This class must have the sequential or explicit attribute.

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

Add a method to this class

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

Add a method to this class

AddMethodOverride ( Method decl, Method body ) : void

Use a method as the implementation for another method (.override)

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

Add a nested class to this class

AddNestedClass ( TypeAttr attrSet, string nsName, string name, Class sType ) : ClassDef

Add a nested class to this class

AddProperty ( string name, Type retType, Type pars ) : Property

Add a property to this class

AddSecurity ( byte permissionSet ) : void

Add security to this class NOT YET IMPLEMENTED

IsEnum ( Class type ) : bool
IsEnum ( string nsName, string name ) : bool
IsValueType ( Class type ) : bool
IsValueType ( string nsName, string name ) : bool
SetFieldOrder ( ArrayList fields ) : void
SpecialNoSuper ( ) : void

Private Methods

Method Description
BuildTables ( MetaData md ) : void
CheckTypeIndex ( ) : void
ClassDef ( TypeAttr attrSet, string nsName, string name, MetaData md ) : System
GetCodedIx ( CIx code ) : uint
MakeValueClass ( ValueClass vClass ) : void
SetSuper ( Class sClass ) : void
Size ( MetaData md ) : uint
TypeDefOrRefToken ( ) : uint
TypeSig ( MemoryStream sig ) : void
Write ( PEAPI.FileImage output ) : void

Method Details

AddAttribute() public method

Add an attribute to this class
public AddAttribute ( TypeAttr ta ) : void
ta TypeAttr the attribute to be added
return void

AddEvent() public method

Add an event to this class
public AddEvent ( string name, Type eType ) : Event
name string event name
eType Type event type
return Event

AddField() public method

Add a field to this class
public AddField ( FieldAttr fAtts, string name, Type fType ) : FieldDef
fAtts FieldAttr attributes for this field
name string field name
fType Type field type
return FieldDef

AddField() public method

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

AddGenericParameter() public method

Add a named generic type parameter
public AddGenericParameter ( short index, string name ) : GenericParameter
index short
name string
return GenericParameter

AddGenericParameter() public method

Add a named generic type parameter with attributes
public AddGenericParameter ( short index, string name, GenericParamAttributes attr ) : GenericParameter
index short
name string
attr GenericParamAttributes
return GenericParameter

AddImplementedInterface() public method

Add an interface that is implemented by this class
public AddImplementedInterface ( Class iFace ) : void
iFace Class the interface that is implemented
return void

AddLayoutInfo() public method

Add layout information for this class. This class must have the sequential or explicit attribute.
public AddLayoutInfo ( int packSize, int classSize ) : void
packSize int packing size (.pack)
classSize int class size (.size)
return void

AddMethod() public method

Add a method to this class
public AddMethod ( MethAttr mAtts, ImplAttr iAtts, string name, Param ret_param, Param pars ) : MethodDef
mAtts MethAttr attributes for this method
iAtts ImplAttr implementation attributes for this method
name string method name
ret_param Param
pars Param parameters
return MethodDef

AddMethod() public method

public AddMethod ( string name, Param ret_param, Param pars ) : MethodDef
name string
ret_param Param
pars Param
return MethodDef

AddMethod() public method

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

AddMethodOverride() public method

Use a method as the implementation for another method (.override)
public AddMethodOverride ( Method decl, Method body ) : void
decl Method the method to be overridden
body Method the implementation to be used
return void

AddNestedClass() public method

Add a nested class to this class
public AddNestedClass ( TypeAttr attrSet, string nsName, string name ) : ClassDef
attrSet TypeAttr attributes for this nested class
nsName string nested name space name
name string nested class name
return ClassDef

AddNestedClass() public method

Add a nested class to this class
public AddNestedClass ( TypeAttr attrSet, string nsName, string name, Class sType ) : ClassDef
attrSet TypeAttr attributes for this nested class
nsName string nested name space name
name string nested class name
sType Class super type of this nested class
return ClassDef

AddProperty() public method

Add a property to this class
public AddProperty ( string name, Type retType, Type pars ) : Property
name string property name
retType Type
pars Type
return Property

AddSecurity() public method

Add security to this class NOT YET IMPLEMENTED
public AddSecurity ( byte permissionSet ) : void
permissionSet byte
return void

IsEnum() public static method

public static IsEnum ( Class type ) : bool
type Class
return bool

IsEnum() public static method

public static IsEnum ( string nsName, string name ) : bool
nsName string
name string
return bool

IsValueType() public static method

public static IsValueType ( Class type ) : bool
type Class
return bool

IsValueType() public static method

public static IsValueType ( string nsName, string name ) : bool
nsName string
name string
return bool

SetFieldOrder() public method

public SetFieldOrder ( ArrayList fields ) : void
fields System.Collections.ArrayList
return void

SpecialNoSuper() public method

public SpecialNoSuper ( ) : void
return void