C# Class PERWAPI.ClassDef

The descriptor for a class defined in the IL (.class) in the current assembly/module
Inheritance: ClassDesc
ファイルを表示 Open project: xored/f4 Class Usage Examples

Protected Properties

Property Type Description
scope PEFile

Private Properties

Property Type Description
AddEvent void
AddGenericsToTable void
AddImplementedInterface void
AddMethodImpl void
AddProperty void
AddSecurity void
AddToFeatureList void
BuildCILInfo void
BuildTables void
ChangeRefsToDefs void
ClassDef System
ClassDef System
ClassName string
FindFeature Feature
FindGenericParam int
GetClassRefs void
GetCodedIx uint
GetParentClassIx uint
MakeNestedClass NestedClassDef
NameString string
Read void
ReadSecurity void
Resolve void
SetScope void
Size uint
TypeDefOrRefToken uint
Write void
Write void
WriteFlags void
WriteName void
WriteType void
isDef bool
isNested bool
isPublic bool
isPublic bool

Public Methods

Method Description
AddAttribute ( TypeAttr ta ) : void

Add an attribute to the attributes of 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

AddField ( FieldDef f ) : void

Add a field to this class

AddGenericParam ( string name ) : GenericParam
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, GenericParam genPars, Type retType, Param pars ) : MethodDef

Add a method to this class

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

Add a method to this class

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

Add a method to this class

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

Add a method to this class

AddMethod ( MethodDef meth ) : void

Add a method to this class

AddMethodOverride ( Method decl, Method body ) : void

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

AddMethodOverride ( MethodImpl mImpl ) : void
AddNestedClass ( TypeAttr attrSet, string name ) : NestedClassDef

Add a nested class to this class

AddNestedClass ( TypeAttr attrSet, string name, Class sType ) : NestedClassDef

Add a nested class to this class

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

Add a property to this class

AddSecurity ( SecurityAction act, byte permissionSet ) : void

Add security to this class

DeleteSecurity ( ) : void

Remove the security associated with this class

GetAttributes ( ) : TypeAttr

Get the attributes for this class

GetClassSize ( ) : int

Get the size of this class (only valid for ExplicitLayout or SequentialLayout

GetEvent ( string name ) : Event

Get the event "name" of this class

GetEvents ( ) : PERWAPI.Event[]

Get all the events of this class

GetField ( string name ) : FieldDef

Get the descriptor for the field of this class named "name"

GetFields ( ) : PERWAPI.FieldDef[]

Get the fields for this class

GetGenericParam ( string name ) : GenericParam
GetGenericParamCount ( ) : int
GetInterfaces ( ) : PERWAPI.Class[]

Get the interfaces implemented by this class

GetMethod ( string name ) : MethodDef

Get the descriptor for the method "name" of this class

GetMethod ( string name, Type parTypes ) : MethodDef

Get the descriptor for the method called "name" with the signature "parTypes"

GetMethodOverrides ( ) : PERWAPI.MethodImpl[]
GetMethods ( ) : PERWAPI.MethodDef[]

Get all the methods for this class

GetMethods ( string name ) : PERWAPI.MethodDef[]

Get all the methods of this class called "name"

GetNestedClass ( string name ) : NestedClassDef

Get the nested class called "name"

GetPackSize ( ) : int

Get the pack size for this class (only valid for ExplicitLayout or SequentialLayout

GetParent ( ) : MetaDataElement
GetProperties ( ) : Property[]

Get all the properties for this class

GetProperty ( string name ) : Property

Get the property "name" for this class

GetScope ( ) : PEFile

Fetch the PEFile which contains this class

GetSecurity ( ) : PERWAPI.DeclSecurity[]

Get the security descriptor associated with this class

Instantiate ( Type genTypes ) : ClassSpec
MakeRefOf ( ) : ClassRef

Make a ClassRef for this ClassDef

MakeSpecial ( ) : void
MergeClasses ( ClassDef classes ) : void
RemoveEvent ( string name ) : void

Remove the event "name" from this class

RemoveGenericParam ( int ix ) : void
RemoveGenericParam ( string name ) : void
RemoveMethodOverride ( MethodImpl mImpl ) : void
RemoveProperty ( string name ) : void

Remove the property "name" from this class

SetAttribute ( TypeAttr ta ) : void

Set the attributes of this class

Private Methods

Method Description
AddEvent ( Event ev ) : void
AddGenericsToTable ( MetaDataOut md ) : void
AddImplementedInterface ( InterfaceImpl iImpl ) : void
AddMethodImpl ( MethodImpl impl ) : void
AddProperty ( Property prop ) : void
AddSecurity ( DeclSecurity sec ) : void

Add security to this class

AddToFeatureList ( ArrayList list, MDTable tabIx ) : void
BuildCILInfo ( CILWriter output ) : void
BuildTables ( MetaDataOut md ) : void
ChangeRefsToDefs ( ClassDef newType, ClassDef oldTypes ) : void
ClassDef ( PEFile scope, TypeAttr attrSet, string nsName, string name ) : System
ClassDef ( PEReader buff, uint row, bool isMSCorLib ) : System
ClassName ( ) : string
FindFeature ( string name, ArrayList featureList ) : Feature
FindGenericParam ( string name ) : int
GetClassRefs ( PEReader buff, TableRow typeRefs, ReferenceScope paren, uint parIxs ) : void
GetCodedIx ( CIx code ) : uint
GetParentClassIx ( uint enclClasses, uint nestClasses, uint classIx ) : uint
MakeNestedClass ( ClassDef parent ) : NestedClassDef
NameString ( ) : string
Read ( PEReader buff, TableRow typeDefs, bool isMSCorLib ) : void
ReadSecurity ( ) : void
Resolve ( PEReader buff ) : void
SetScope ( PEFile mod ) : void
Size ( MetaData md ) : uint
TypeDefOrRefToken ( ) : uint
Write ( CILWriter output ) : void
Write ( PEWriter output ) : void
WriteFlags ( CILWriter output ) : void
WriteName ( CILWriter output ) : void
WriteType ( CILWriter output ) : void
isDef ( ) : bool
isNested ( uint flags ) : bool
isPublic ( ) : bool
isPublic ( uint flags ) : bool

Method Details

AddAttribute() public method

Add an attribute to the attributes of 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

AddField() public method

Add a field to this class
public AddField ( FieldDef f ) : void
f FieldDef Descriptor for the field to be added
return void

AddGenericParam() public method

public AddGenericParam ( string name ) : GenericParam
name string
return GenericParam

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, GenericParam genPars, Type retType, Param pars ) : MethodDef
mAtts MethAttr attributes for this method
iAtts ImplAttr implementation attributes for this method
name string method name
genPars GenericParam generic parameters
retType Type return type
pars Param parameters
return MethodDef

AddMethod() public method

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

AddMethod() public method

Add a method to this class
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 parameters
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

AddMethod() public method

Add a method to this class
public AddMethod ( MethodDef meth ) : void
meth MethodDef Descriptor for the method to be added
return void

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

AddMethodOverride() public method

public AddMethodOverride ( MethodImpl mImpl ) : void
mImpl MethodImpl
return void

AddNestedClass() public method

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

AddNestedClass() public method

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

AddProperty() public method

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

AddSecurity() public method

Add security to this class
public AddSecurity ( SecurityAction act, byte permissionSet ) : void
act SecurityAction The security action
permissionSet byte Permission set
return void

DeleteSecurity() public method

Remove the security associated with this class
public DeleteSecurity ( ) : void
return void

GetAttributes() public method

Get the attributes for this class
public GetAttributes ( ) : TypeAttr
return TypeAttr

GetClassSize() public method

Get the size of this class (only valid for ExplicitLayout or SequentialLayout
public GetClassSize ( ) : int
return int

GetEvent() public method

Get the event "name" of this class
public GetEvent ( string name ) : Event
name string The event name
return Event

GetEvents() public method

Get all the events of this class
public GetEvents ( ) : PERWAPI.Event[]
return PERWAPI.Event[]

GetField() public method

Get the descriptor for the field of this class named "name"
public GetField ( string name ) : FieldDef
name string The field name
return FieldDef

GetFields() public method

Get the fields for this class
public GetFields ( ) : PERWAPI.FieldDef[]
return PERWAPI.FieldDef[]

GetGenericParam() public method

public GetGenericParam ( string name ) : GenericParam
name string
return GenericParam

GetGenericParamCount() public method

public GetGenericParamCount ( ) : int
return int

GetInterfaces() public method

Get the interfaces implemented by this class
public GetInterfaces ( ) : PERWAPI.Class[]
return PERWAPI.Class[]

GetMethod() public method

Get the descriptor for the method "name" of this class
public GetMethod ( string name ) : MethodDef
name string The name of the method to be retrieved
return MethodDef

GetMethod() public method

Get the descriptor for the method called "name" with the signature "parTypes"
public GetMethod ( string name, Type parTypes ) : MethodDef
name string The name of the method
parTypes Type The signature of the method
return MethodDef

GetMethodOverrides() public method

public GetMethodOverrides ( ) : PERWAPI.MethodImpl[]
return PERWAPI.MethodImpl[]

GetMethods() public method

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

GetMethods() public method

Get all the methods of this class called "name"
public GetMethods ( string name ) : PERWAPI.MethodDef[]
name string The method name
return PERWAPI.MethodDef[]

GetNestedClass() public method

Get the nested class called "name"
public GetNestedClass ( string name ) : NestedClassDef
name string The name of the nested class
return NestedClassDef

GetPackSize() public method

Get the pack size for this class (only valid for ExplicitLayout or SequentialLayout
public GetPackSize ( ) : int
return int

GetParent() public method

public GetParent ( ) : MetaDataElement
return MetaDataElement

GetProperties() public method

Get all the properties for this class
public GetProperties ( ) : Property[]
return Property[]

GetProperty() public method

Get the property "name" for this class
public GetProperty ( string name ) : Property
name string Descriptor for the property "name"
return Property

GetScope() public method

Fetch the PEFile which contains this class
public GetScope ( ) : PEFile
return PEFile

GetSecurity() public method

Get the security descriptor associated with this class
public GetSecurity ( ) : PERWAPI.DeclSecurity[]
return PERWAPI.DeclSecurity[]

Instantiate() public method

public Instantiate ( Type genTypes ) : ClassSpec
genTypes Type
return ClassSpec

MakeRefOf() public method

Make a ClassRef for this ClassDef
public MakeRefOf ( ) : ClassRef
return ClassRef

MakeSpecial() public method

public MakeSpecial ( ) : void
return void

MergeClasses() public method

public MergeClasses ( ClassDef classes ) : void
classes ClassDef
return void

RemoveEvent() public method

Remove the event "name" from this class
public RemoveEvent ( string name ) : void
name string The name of the event to be removed
return void

RemoveGenericParam() public method

public RemoveGenericParam ( int ix ) : void
ix int
return void

RemoveGenericParam() public method

public RemoveGenericParam ( string name ) : void
name string
return void

RemoveMethodOverride() public method

public RemoveMethodOverride ( MethodImpl mImpl ) : void
mImpl MethodImpl
return void

RemoveProperty() public method

Remove the property "name" from this class
public RemoveProperty ( string name ) : void
name string Name of the property to be removed
return void

SetAttribute() public method

Set the attributes of this class
public SetAttribute ( TypeAttr ta ) : void
ta TypeAttr class attributes
return void

Property Details

scope protected_oe property

protected PEFile,PERWAPI scope
return PEFile