C# Класс PERWAPI.ClassDef

The descriptor for a class defined in the IL (.class) in the current assembly/module
Наследование: ClassDesc
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
scope PEFile

Private Properties

Свойство Тип Описание
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

Открытые методы

Метод Описание
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

Приватные методы

Метод Описание
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

Описание методов

AddAttribute() публичный Метод

Add an attribute to the attributes of this class
public AddAttribute ( TypeAttr ta ) : void
ta TypeAttr the attribute to be added
Результат void

AddEvent() публичный Метод

Add an event to this class
public AddEvent ( string name, Type eType ) : Event
name string event name
eType Type event type
Результат Event

AddField() публичный Метод

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
Результат FieldDef

AddField() публичный Метод

Add a field to this class
public AddField ( string name, Type fType ) : FieldDef
name string field name
fType Type field type
Результат FieldDef

AddField() публичный Метод

Add a field to this class
public AddField ( FieldDef f ) : void
f FieldDef Descriptor for the field to be added
Результат void

AddGenericParam() публичный Метод

public AddGenericParam ( string name ) : GenericParam
name string
Результат GenericParam

AddImplementedInterface() публичный Метод

Add an interface that is implemented by this class
public AddImplementedInterface ( Class iFace ) : void
iFace Class the interface that is implemented
Результат void

AddLayoutInfo() публичный Метод

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)
Результат void

AddMethod() публичный Метод

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
Результат MethodDef

AddMethod() публичный Метод

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
Результат MethodDef

AddMethod() публичный Метод

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
Результат MethodDef

AddMethod() публичный Метод

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
Результат MethodDef

AddMethod() публичный Метод

Add a method to this class
public AddMethod ( MethodDef meth ) : void
meth MethodDef Descriptor for the method to be added
Результат void

AddMethodOverride() публичный Метод

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
Результат void

AddMethodOverride() публичный Метод

public AddMethodOverride ( MethodImpl mImpl ) : void
mImpl MethodImpl
Результат void

AddNestedClass() публичный Метод

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
Результат NestedClassDef

AddNestedClass() публичный Метод

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
Результат NestedClassDef

AddProperty() публичный Метод

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
Результат Property

AddSecurity() публичный Метод

Add security to this class
public AddSecurity ( SecurityAction act, byte permissionSet ) : void
act SecurityAction The security action
permissionSet byte Permission set
Результат void

DeleteSecurity() публичный Метод

Remove the security associated with this class
public DeleteSecurity ( ) : void
Результат void

GetAttributes() публичный Метод

Get the attributes for this class
public GetAttributes ( ) : TypeAttr
Результат TypeAttr

GetClassSize() публичный Метод

Get the size of this class (only valid for ExplicitLayout or SequentialLayout
public GetClassSize ( ) : int
Результат int

GetEvent() публичный Метод

Get the event "name" of this class
public GetEvent ( string name ) : Event
name string The event name
Результат Event

GetEvents() публичный Метод

Get all the events of this class
public GetEvents ( ) : PERWAPI.Event[]
Результат PERWAPI.Event[]

GetField() публичный Метод

Get the descriptor for the field of this class named "name"
public GetField ( string name ) : FieldDef
name string The field name
Результат FieldDef

GetFields() публичный Метод

Get the fields for this class
public GetFields ( ) : PERWAPI.FieldDef[]
Результат PERWAPI.FieldDef[]

GetGenericParam() публичный Метод

public GetGenericParam ( string name ) : GenericParam
name string
Результат GenericParam

GetGenericParamCount() публичный Метод

public GetGenericParamCount ( ) : int
Результат int

GetInterfaces() публичный Метод

Get the interfaces implemented by this class
public GetInterfaces ( ) : PERWAPI.Class[]
Результат PERWAPI.Class[]

GetMethod() публичный Метод

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
Результат MethodDef

GetMethod() публичный Метод

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
Результат MethodDef

GetMethodOverrides() публичный Метод

public GetMethodOverrides ( ) : PERWAPI.MethodImpl[]
Результат PERWAPI.MethodImpl[]

GetMethods() публичный Метод

Get all the methods for this class
public GetMethods ( ) : PERWAPI.MethodDef[]
Результат PERWAPI.MethodDef[]

GetMethods() публичный Метод

Get all the methods of this class called "name"
public GetMethods ( string name ) : PERWAPI.MethodDef[]
name string The method name
Результат PERWAPI.MethodDef[]

GetNestedClass() публичный Метод

Get the nested class called "name"
public GetNestedClass ( string name ) : NestedClassDef
name string The name of the nested class
Результат NestedClassDef

GetPackSize() публичный Метод

Get the pack size for this class (only valid for ExplicitLayout or SequentialLayout
public GetPackSize ( ) : int
Результат int

GetParent() публичный Метод

public GetParent ( ) : MetaDataElement
Результат MetaDataElement

GetProperties() публичный Метод

Get all the properties for this class
public GetProperties ( ) : Property[]
Результат Property[]

GetProperty() публичный Метод

Get the property "name" for this class
public GetProperty ( string name ) : Property
name string Descriptor for the property "name"
Результат Property

GetScope() публичный Метод

Fetch the PEFile which contains this class
public GetScope ( ) : PEFile
Результат PEFile

GetSecurity() публичный Метод

Get the security descriptor associated with this class
public GetSecurity ( ) : PERWAPI.DeclSecurity[]
Результат PERWAPI.DeclSecurity[]

Instantiate() публичный Метод

public Instantiate ( Type genTypes ) : ClassSpec
genTypes Type
Результат ClassSpec

MakeRefOf() публичный Метод

Make a ClassRef for this ClassDef
public MakeRefOf ( ) : ClassRef
Результат ClassRef

MakeSpecial() публичный Метод

public MakeSpecial ( ) : void
Результат void

MergeClasses() публичный Метод

public MergeClasses ( ClassDef classes ) : void
classes ClassDef
Результат void

RemoveEvent() публичный Метод

Remove the event "name" from this class
public RemoveEvent ( string name ) : void
name string The name of the event to be removed
Результат void

RemoveGenericParam() публичный Метод

public RemoveGenericParam ( int ix ) : void
ix int
Результат void

RemoveGenericParam() публичный Метод

public RemoveGenericParam ( string name ) : void
name string
Результат void

RemoveMethodOverride() публичный Метод

public RemoveMethodOverride ( MethodImpl mImpl ) : void
mImpl MethodImpl
Результат void

RemoveProperty() публичный Метод

Remove the property "name" from this class
public RemoveProperty ( string name ) : void
name string Name of the property to be removed
Результат void

SetAttribute() публичный Метод

Set the attributes of this class
public SetAttribute ( TypeAttr ta ) : void
ta TypeAttr class attributes
Результат void

Описание свойств

scope защищенное свойство

protected PEFile,PERWAPI scope
Результат PEFile