C# Class ICSharpCode.NRefactory.MonoCSharp.TypeDefinition

Inheritance: TypeContainer, ITypeDefinition
Afficher le fichier Open project: 0xd4d/NRefactory Class Usage Examples

Méthodes publiques

Свойство Type Description
AnonymousMethodsCounter int
DynamicSitesCounter int
MethodGroupsCounter int
TypeBuilder TypeBuilder

Protected Properties

Свойство Type Description
base_type System.TypeSpec
first_nonstatic_field ICSharpCode.NRefactory.MonoCSharp.FieldBase
has_static_constructor bool
iface_exprs System.TypeSpec[]
initialized_fields List
initialized_static_fields List
requires_delayed_unmanagedtype_check bool
spec System.TypeSpec
type_bases List

Private Properties

Свойство Type Description
CheckRecursiveDefinition System.TypeSpec
CreateTypeBuilder bool
CreateTypeParameters string[]
DoDefineBaseType bool
GenerateDocComment void
ITypeDefinition bool
LookupNestedTypeInHierarchy System.TypeSpec

Méthodes publiques

Méthode Description
Accept ( StructuralVisitor visitor ) : void
AddConstructor ( Constructor c ) : void
AddConstructor ( Constructor c, bool isDefault ) : void
AddField ( ICSharpCode.NRefactory.MonoCSharp.FieldBase field ) : bool
AddIndexer ( ICSharpCode.NRefactory.MonoCSharp.Indexer i ) : void

Indexer has special handling in constrast to other AddXXX because the name can be driven by IndexerNameAttribute

AddMember ( MemberCore symbol ) : void
AddNameToContainer ( MemberCore symbol, string name ) : void
AddOperator ( Operator op ) : void
AddPartialPart ( TypeDefinition part ) : void
AddTypeContainer ( TypeContainer tc ) : void
ApplyAttributeBuilder ( Attribute a, MethodSpec ctor, byte cdata, PredefinedAttributes pa ) : void
CheckAttributeClsCompliance ( ) : void
CheckPairedOperators ( ) : void
CloseContainer ( ) : void
ComputeIndexerName ( ) : void
CreateContainer ( ) : bool
CreateHoistedBaseCallProxy ( ICSharpCode.NRefactory.MonoCSharp.ResolveContext rc, MethodSpec method ) : MethodSpec
CreateMetadataName ( StringBuilder sb ) : void
CreateMethodSymbolEntry ( ) : SourceMethodBuilder
Define ( ) : bool

Populates our TypeBuilder with fields and methods

DoExpandBaseInterfaces ( ) : void
Emit ( ) : void
EmitContainer ( ) : void
EmitIndexerName ( ) : void
ExpandBaseInterfaces ( ) : void
FilterNestedName ( string name ) : string
GetAttributeCoClass ( ) : System.TypeSpec
GetAttributeDefaultMember ( ) : string
GetAttributeUsage ( PredefinedAttribute pa ) : AttributeUsageAttribute
GetCompilationSourceFile ( ) : ICSharpCode.NRefactory.MonoCSharp.CompilationSourceFile
GetSignatureForMetadata ( ) : string
IsBaseTypeDefinition ( System.TypeSpec baseType ) : bool
IsClsComplianceRequired ( ) : bool
IsUnmanagedType ( ) : bool
LoadMembers ( System.TypeSpec declaringType, bool onlyTypes, MemberCache &cache ) : void
LookupNamespaceOrType ( string name, int arity, LookupMode mode, Location loc ) : FullNamedExpression
Mark_HasEquals ( ) : void
Mark_HasGetHashCode ( ) : void
MethodModifiersValid ( MemberCore mc ) : bool
PrepareEmit ( ) : void
RegisterFieldForInitialization ( MemberCore field, ICSharpCode.NRefactory.MonoCSharp.FieldInitializer expression ) : void
RemoveContainer ( TypeContainer cont ) : void
ResolveFieldInitializers ( ICSharpCode.NRefactory.MonoCSharp.BlockContext ec ) : void
SetBaseType ( ) : void
SetBaseTypes ( List baseTypes ) : void
SetPredefinedSpec ( BuiltinTypeSpec spec ) : void
VerifyImplements ( InterfaceMemberBase mb ) : bool

Performs checks for an explicit interface implementation. First it checks whether the `interface_type' is a base inteface implementation. Then it checks whether `name' exists in the interface type.

VerifyMembers ( ) : void
WriteDebugSymbol ( MonoSymbolFile file ) : void

Méthodes protégées

Méthode Description
AddTypeContainerMember ( TypeContainer tc ) : void
DefineBaseTypes ( ) : bool
DoDefineContainer ( ) : void
DoDefineMembers ( ) : bool
DoResolveTypeParameters ( ) : bool
ResolveBaseTypes ( FullNamedExpression &base_class ) : System.TypeSpec[]

This function computes the Base class and also the list of interfaces that the class or struct @c implements. The return value is an array (might be null) of interfaces implemented (as Types). The @base_class argument is set to the base object or null if this is `System.Object'.

TypeDefinition ( TypeContainer parent, MemberName name, Attributes attrs, MemberKind kind ) : System
VerifyClsCompliance ( ) : bool

Private Methods

Méthode Description
CheckRecursiveDefinition ( TypeDefinition tc ) : System.TypeSpec
CreateTypeBuilder ( ) : bool
CreateTypeParameters ( TypeParameters parentAllTypeParameters ) : string[]
DoDefineBaseType ( ) : bool
GenerateDocComment ( ICSharpCode.NRefactory.MonoCSharp.DocumentationBuilder builder ) : void
ITypeDefinition ( IAssemblyDefinition assembly ) : bool
LookupNestedTypeInHierarchy ( string name, int arity ) : System.TypeSpec

Method Details

Accept() public méthode

public Accept ( StructuralVisitor visitor ) : void
visitor StructuralVisitor
Résultat void

AddConstructor() public méthode

public AddConstructor ( Constructor c ) : void
c Constructor
Résultat void

AddConstructor() public méthode

public AddConstructor ( Constructor c, bool isDefault ) : void
c Constructor
isDefault bool
Résultat void

AddField() public méthode

public AddField ( ICSharpCode.NRefactory.MonoCSharp.FieldBase field ) : bool
field ICSharpCode.NRefactory.MonoCSharp.FieldBase
Résultat bool

AddIndexer() public méthode

Indexer has special handling in constrast to other AddXXX because the name can be driven by IndexerNameAttribute
public AddIndexer ( ICSharpCode.NRefactory.MonoCSharp.Indexer i ) : void
i ICSharpCode.NRefactory.MonoCSharp.Indexer
Résultat void

AddMember() public méthode

public AddMember ( MemberCore symbol ) : void
symbol MemberCore
Résultat void

AddNameToContainer() public méthode

public AddNameToContainer ( MemberCore symbol, string name ) : void
symbol MemberCore
name string
Résultat void

AddOperator() public méthode

public AddOperator ( Operator op ) : void
op Operator
Résultat void

AddPartialPart() public méthode

public AddPartialPart ( TypeDefinition part ) : void
part TypeDefinition
Résultat void

AddTypeContainer() public méthode

public AddTypeContainer ( TypeContainer tc ) : void
tc TypeContainer
Résultat void

AddTypeContainerMember() protected méthode

protected AddTypeContainerMember ( TypeContainer tc ) : void
tc TypeContainer
Résultat void

ApplyAttributeBuilder() public méthode

public ApplyAttributeBuilder ( Attribute a, MethodSpec ctor, byte cdata, PredefinedAttributes pa ) : void
a System.Attribute
ctor MethodSpec
cdata byte
pa PredefinedAttributes
Résultat void

CheckAttributeClsCompliance() public méthode

public CheckAttributeClsCompliance ( ) : void
Résultat void

CheckPairedOperators() public méthode

public CheckPairedOperators ( ) : void
Résultat void

CloseContainer() public méthode

public CloseContainer ( ) : void
Résultat void

ComputeIndexerName() public méthode

public ComputeIndexerName ( ) : void
Résultat void

CreateContainer() public méthode

public CreateContainer ( ) : bool
Résultat bool

CreateHoistedBaseCallProxy() public méthode

public CreateHoistedBaseCallProxy ( ICSharpCode.NRefactory.MonoCSharp.ResolveContext rc, MethodSpec method ) : MethodSpec
rc ICSharpCode.NRefactory.MonoCSharp.ResolveContext
method MethodSpec
Résultat MethodSpec

CreateMetadataName() public méthode

public CreateMetadataName ( StringBuilder sb ) : void
sb StringBuilder
Résultat void

CreateMethodSymbolEntry() public méthode

public CreateMethodSymbolEntry ( ) : SourceMethodBuilder
Résultat Mono.CompilerServices.SymbolWriter.SourceMethodBuilder

Define() public final méthode

Populates our TypeBuilder with fields and methods
public final Define ( ) : bool
Résultat bool

DefineBaseTypes() protected méthode

protected DefineBaseTypes ( ) : bool
Résultat bool

DoDefineContainer() protected méthode

protected DoDefineContainer ( ) : void
Résultat void

DoDefineMembers() protected méthode

protected DoDefineMembers ( ) : bool
Résultat bool

DoExpandBaseInterfaces() public méthode

public DoExpandBaseInterfaces ( ) : void
Résultat void

DoResolveTypeParameters() protected méthode

protected DoResolveTypeParameters ( ) : bool
Résultat bool

Emit() public méthode

public Emit ( ) : void
Résultat void

EmitContainer() public final méthode

public final EmitContainer ( ) : void
Résultat void

EmitIndexerName() public méthode

public EmitIndexerName ( ) : void
Résultat void

ExpandBaseInterfaces() public méthode

public ExpandBaseInterfaces ( ) : void
Résultat void

FilterNestedName() public static méthode

public static FilterNestedName ( string name ) : string
name string
Résultat string

GetAttributeCoClass() public méthode

public GetAttributeCoClass ( ) : System.TypeSpec
Résultat System.TypeSpec

GetAttributeDefaultMember() public méthode

public GetAttributeDefaultMember ( ) : string
Résultat string

GetAttributeUsage() public méthode

public GetAttributeUsage ( PredefinedAttribute pa ) : AttributeUsageAttribute
pa PredefinedAttribute
Résultat System.AttributeUsageAttribute

GetCompilationSourceFile() public méthode

public GetCompilationSourceFile ( ) : ICSharpCode.NRefactory.MonoCSharp.CompilationSourceFile
Résultat ICSharpCode.NRefactory.MonoCSharp.CompilationSourceFile

GetSignatureForMetadata() public méthode

public GetSignatureForMetadata ( ) : string
Résultat string

IsBaseTypeDefinition() public méthode

public IsBaseTypeDefinition ( System.TypeSpec baseType ) : bool
baseType System.TypeSpec
Résultat bool

IsClsComplianceRequired() public méthode

public IsClsComplianceRequired ( ) : bool
Résultat bool

IsUnmanagedType() public méthode

public IsUnmanagedType ( ) : bool
Résultat bool

LoadMembers() public méthode

public LoadMembers ( System.TypeSpec declaringType, bool onlyTypes, MemberCache &cache ) : void
declaringType System.TypeSpec
onlyTypes bool
cache MemberCache
Résultat void

LookupNamespaceOrType() public méthode

public LookupNamespaceOrType ( string name, int arity, LookupMode mode, Location loc ) : FullNamedExpression
name string
arity int
mode LookupMode
loc Location
Résultat FullNamedExpression

Mark_HasEquals() public méthode

public Mark_HasEquals ( ) : void
Résultat void

Mark_HasGetHashCode() public méthode

public Mark_HasGetHashCode ( ) : void
Résultat void

MethodModifiersValid() public méthode

public MethodModifiersValid ( MemberCore mc ) : bool
mc MemberCore
Résultat bool

PrepareEmit() public méthode

public PrepareEmit ( ) : void
Résultat void

RegisterFieldForInitialization() public méthode

public RegisterFieldForInitialization ( MemberCore field, ICSharpCode.NRefactory.MonoCSharp.FieldInitializer expression ) : void
field MemberCore
expression ICSharpCode.NRefactory.MonoCSharp.FieldInitializer
Résultat void

RemoveContainer() public méthode

public RemoveContainer ( TypeContainer cont ) : void
cont TypeContainer
Résultat void

ResolveBaseTypes() protected méthode

This function computes the Base class and also the list of interfaces that the class or struct @c implements. The return value is an array (might be null) of interfaces implemented (as Types). The @base_class argument is set to the base object or null if this is `System.Object'.
protected ResolveBaseTypes ( FullNamedExpression &base_class ) : System.TypeSpec[]
base_class FullNamedExpression
Résultat System.TypeSpec[]

ResolveFieldInitializers() public méthode

public ResolveFieldInitializers ( ICSharpCode.NRefactory.MonoCSharp.BlockContext ec ) : void
ec ICSharpCode.NRefactory.MonoCSharp.BlockContext
Résultat void

SetBaseType() public méthode

public SetBaseType ( ) : void
Résultat void

SetBaseTypes() public méthode

public SetBaseTypes ( List baseTypes ) : void
baseTypes List
Résultat void

SetPredefinedSpec() public méthode

public SetPredefinedSpec ( BuiltinTypeSpec spec ) : void
spec BuiltinTypeSpec
Résultat void

TypeDefinition() protected méthode

protected TypeDefinition ( TypeContainer parent, MemberName name, Attributes attrs, MemberKind kind ) : System
parent TypeContainer
name MemberName
attrs Attributes
kind MemberKind
Résultat System

VerifyClsCompliance() protected méthode

protected VerifyClsCompliance ( ) : bool
Résultat bool

VerifyImplements() public méthode

Performs checks for an explicit interface implementation. First it checks whether the `interface_type' is a base inteface implementation. Then it checks whether `name' exists in the interface type.
public VerifyImplements ( InterfaceMemberBase mb ) : bool
mb InterfaceMemberBase
Résultat bool

VerifyMembers() public méthode

public VerifyMembers ( ) : void
Résultat void

WriteDebugSymbol() public méthode

public WriteDebugSymbol ( MonoSymbolFile file ) : void
file Mono.CompilerServices.SymbolWriter.MonoSymbolFile
Résultat void

Property Details

AnonymousMethodsCounter public_oe property

public int AnonymousMethodsCounter
Résultat int

DynamicSitesCounter public_oe property

public int DynamicSitesCounter
Résultat int

MethodGroupsCounter public_oe property

public int MethodGroupsCounter
Résultat int

TypeBuilder public_oe property

public TypeBuilder TypeBuilder
Résultat TypeBuilder

base_type protected_oe property

protected TypeSpec,System base_type
Résultat System.TypeSpec

first_nonstatic_field protected_oe property

protected FieldBase,ICSharpCode.NRefactory.MonoCSharp first_nonstatic_field
Résultat ICSharpCode.NRefactory.MonoCSharp.FieldBase

has_static_constructor protected_oe property

protected bool has_static_constructor
Résultat bool

iface_exprs protected_oe property

protected TypeSpec[],System iface_exprs
Résultat System.TypeSpec[]

initialized_fields protected_oe property

protected List initialized_fields
Résultat List

initialized_static_fields protected_oe property

protected List initialized_static_fields
Résultat List

requires_delayed_unmanagedtype_check protected_oe property

protected bool requires_delayed_unmanagedtype_check
Résultat bool

spec protected_oe property

protected TypeSpec,System spec
Résultat System.TypeSpec

type_bases protected_oe property

protected List type_bases
Résultat List