C# Class ICSharpCode.NRefactory.MonoCSharp.TypeDefinition

Inheritance: TypeContainer, ITypeDefinition
Mostrar archivo Open project: 0xd4d/NRefactory Class Usage Examples

Public Properties

Property Type Description
AnonymousMethodsCounter int
DynamicSitesCounter int
MethodGroupsCounter int
TypeBuilder TypeBuilder

Protected Properties

Property 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

Property Type Description
CheckRecursiveDefinition System.TypeSpec
CreateTypeBuilder bool
CreateTypeParameters string[]
DoDefineBaseType bool
GenerateDocComment void
ITypeDefinition bool
LookupNestedTypeInHierarchy System.TypeSpec

Public Methods

Method 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

Protected Methods

Method 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

Method 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 method

public Accept ( StructuralVisitor visitor ) : void
visitor StructuralVisitor
return void

AddConstructor() public method

public AddConstructor ( Constructor c ) : void
c Constructor
return void

AddConstructor() public method

public AddConstructor ( Constructor c, bool isDefault ) : void
c Constructor
isDefault bool
return void

AddField() public method

public AddField ( ICSharpCode.NRefactory.MonoCSharp.FieldBase field ) : bool
field ICSharpCode.NRefactory.MonoCSharp.FieldBase
return bool

AddIndexer() public method

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
return void

AddMember() public method

public AddMember ( MemberCore symbol ) : void
symbol MemberCore
return void

AddNameToContainer() public method

public AddNameToContainer ( MemberCore symbol, string name ) : void
symbol MemberCore
name string
return void

AddOperator() public method

public AddOperator ( Operator op ) : void
op Operator
return void

AddPartialPart() public method

public AddPartialPart ( TypeDefinition part ) : void
part TypeDefinition
return void

AddTypeContainer() public method

public AddTypeContainer ( TypeContainer tc ) : void
tc TypeContainer
return void

AddTypeContainerMember() protected method

protected AddTypeContainerMember ( TypeContainer tc ) : void
tc TypeContainer
return void

ApplyAttributeBuilder() public method

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

CheckAttributeClsCompliance() public method

public CheckAttributeClsCompliance ( ) : void
return void

CheckPairedOperators() public method

public CheckPairedOperators ( ) : void
return void

CloseContainer() public method

public CloseContainer ( ) : void
return void

ComputeIndexerName() public method

public ComputeIndexerName ( ) : void
return void

CreateContainer() public method

public CreateContainer ( ) : bool
return bool

CreateHoistedBaseCallProxy() public method

public CreateHoistedBaseCallProxy ( ICSharpCode.NRefactory.MonoCSharp.ResolveContext rc, MethodSpec method ) : MethodSpec
rc ICSharpCode.NRefactory.MonoCSharp.ResolveContext
method MethodSpec
return MethodSpec

CreateMetadataName() public method

public CreateMetadataName ( StringBuilder sb ) : void
sb StringBuilder
return void

CreateMethodSymbolEntry() public method

public CreateMethodSymbolEntry ( ) : SourceMethodBuilder
return Mono.CompilerServices.SymbolWriter.SourceMethodBuilder

Define() public final method

Populates our TypeBuilder with fields and methods
public final Define ( ) : bool
return bool

DefineBaseTypes() protected method

protected DefineBaseTypes ( ) : bool
return bool

DoDefineContainer() protected method

protected DoDefineContainer ( ) : void
return void

DoDefineMembers() protected method

protected DoDefineMembers ( ) : bool
return bool

DoExpandBaseInterfaces() public method

public DoExpandBaseInterfaces ( ) : void
return void

DoResolveTypeParameters() protected method

protected DoResolveTypeParameters ( ) : bool
return bool

Emit() public method

public Emit ( ) : void
return void

EmitContainer() public final method

public final EmitContainer ( ) : void
return void

EmitIndexerName() public method

public EmitIndexerName ( ) : void
return void

ExpandBaseInterfaces() public method

public ExpandBaseInterfaces ( ) : void
return void

FilterNestedName() public static method

public static FilterNestedName ( string name ) : string
name string
return string

GetAttributeCoClass() public method

public GetAttributeCoClass ( ) : System.TypeSpec
return System.TypeSpec

GetAttributeDefaultMember() public method

public GetAttributeDefaultMember ( ) : string
return string

GetAttributeUsage() public method

public GetAttributeUsage ( PredefinedAttribute pa ) : AttributeUsageAttribute
pa PredefinedAttribute
return System.AttributeUsageAttribute

GetCompilationSourceFile() public method

public GetCompilationSourceFile ( ) : ICSharpCode.NRefactory.MonoCSharp.CompilationSourceFile
return ICSharpCode.NRefactory.MonoCSharp.CompilationSourceFile

GetSignatureForMetadata() public method

public GetSignatureForMetadata ( ) : string
return string

IsBaseTypeDefinition() public method

public IsBaseTypeDefinition ( System.TypeSpec baseType ) : bool
baseType System.TypeSpec
return bool

IsClsComplianceRequired() public method

public IsClsComplianceRequired ( ) : bool
return bool

IsUnmanagedType() public method

public IsUnmanagedType ( ) : bool
return bool

LoadMembers() public method

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

LookupNamespaceOrType() public method

public LookupNamespaceOrType ( string name, int arity, LookupMode mode, Location loc ) : FullNamedExpression
name string
arity int
mode LookupMode
loc Location
return FullNamedExpression

Mark_HasEquals() public method

public Mark_HasEquals ( ) : void
return void

Mark_HasGetHashCode() public method

public Mark_HasGetHashCode ( ) : void
return void

MethodModifiersValid() public method

public MethodModifiersValid ( MemberCore mc ) : bool
mc MemberCore
return bool

PrepareEmit() public method

public PrepareEmit ( ) : void
return void

RegisterFieldForInitialization() public method

public RegisterFieldForInitialization ( MemberCore field, ICSharpCode.NRefactory.MonoCSharp.FieldInitializer expression ) : void
field MemberCore
expression ICSharpCode.NRefactory.MonoCSharp.FieldInitializer
return void

RemoveContainer() public method

public RemoveContainer ( TypeContainer cont ) : void
cont TypeContainer
return void

ResolveBaseTypes() protected method

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
return System.TypeSpec[]

ResolveFieldInitializers() public method

public ResolveFieldInitializers ( ICSharpCode.NRefactory.MonoCSharp.BlockContext ec ) : void
ec ICSharpCode.NRefactory.MonoCSharp.BlockContext
return void

SetBaseType() public method

public SetBaseType ( ) : void
return void

SetBaseTypes() public method

public SetBaseTypes ( List baseTypes ) : void
baseTypes List
return void

SetPredefinedSpec() public method

public SetPredefinedSpec ( BuiltinTypeSpec spec ) : void
spec BuiltinTypeSpec
return void

TypeDefinition() protected method

protected TypeDefinition ( TypeContainer parent, MemberName name, Attributes attrs, MemberKind kind ) : System
parent TypeContainer
name MemberName
attrs Attributes
kind MemberKind
return System

VerifyClsCompliance() protected method

protected VerifyClsCompliance ( ) : bool
return bool

VerifyImplements() public method

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
return bool

VerifyMembers() public method

public VerifyMembers ( ) : void
return void

WriteDebugSymbol() public method

public WriteDebugSymbol ( MonoSymbolFile file ) : void
file Mono.CompilerServices.SymbolWriter.MonoSymbolFile
return void

Property Details

AnonymousMethodsCounter public_oe property

public int AnonymousMethodsCounter
return int

DynamicSitesCounter public_oe property

public int DynamicSitesCounter
return int

MethodGroupsCounter public_oe property

public int MethodGroupsCounter
return int

TypeBuilder public_oe property

public TypeBuilder TypeBuilder
return TypeBuilder

base_type protected_oe property

protected TypeSpec,System base_type
return System.TypeSpec

first_nonstatic_field protected_oe property

protected FieldBase,ICSharpCode.NRefactory.MonoCSharp first_nonstatic_field
return ICSharpCode.NRefactory.MonoCSharp.FieldBase

has_static_constructor protected_oe property

protected bool has_static_constructor
return bool

iface_exprs protected_oe property

protected TypeSpec[],System iface_exprs
return System.TypeSpec[]

initialized_fields protected_oe property

protected List initialized_fields
return List

initialized_static_fields protected_oe property

protected List initialized_static_fields
return List

requires_delayed_unmanagedtype_check protected_oe property

protected bool requires_delayed_unmanagedtype_check
return bool

spec protected_oe property

protected TypeSpec,System spec
return System.TypeSpec

type_bases protected_oe property

protected List type_bases
return List