C# Class ICSharpCode.NRefactory.CSharp.Refactoring.TypeSystemAstBuilder

Converts from type system to the C# AST.
Mostra file Open project: icsharpcode/NRefactory Class Usage Examples

Public Methods

Method Description
ConvertAttribute ( IAttribute attribute ) : Attribute
ConvertConstantValue ( IType type, object constantValue ) : Expression
ConvertConstantValue ( ResolveResult rr ) : Expression
ConvertEntity ( IEntity entity ) : EntityDeclaration
ConvertNamespace ( string namespaceName ) : AstType
ConvertParameter ( IParameter parameter ) : ParameterDeclaration
ConvertSymbol ( ISymbol symbol ) : AstNode
ConvertType ( FullTypeName fullTypeName ) : AstType
ConvertType ( IType type ) : AstType
ConvertVariable ( IVariable v ) : VariableDeclarationStatement
ModifierFromAccessibility ( Accessibility accessibility ) : Modifiers
TypeSystemAstBuilder ( ) : System

Creates a new TypeSystemAstBuilder.

TypeSystemAstBuilder ( CSharpResolver resolver ) : System

Creates a new TypeSystemAstBuilder.

Private Methods

Method Description
AddTypeArguments ( AstType result, ITypeDefinition typeDef, IList typeArguments, int startIndex, int endIndex ) : void

Adds type arguments to the result type.

ConvertAccessor ( IMethod accessor, Accessibility ownerAccessibility, bool addParamterAttribute ) : Accessor
ConvertConstructor ( IMethod ctor ) : ConstructorDeclaration
ConvertDelegate ( IMethod invokeMethod, Modifiers modifiers ) : DelegateDeclaration
ConvertDestructor ( IMethod dtor ) : DestructorDeclaration
ConvertEnumValue ( IType type, long val ) : Expression
ConvertEvent ( IEvent ev ) : EntityDeclaration
ConvertField ( IField field ) : FieldDeclaration
ConvertIndexer ( IProperty indexer ) : IndexerDeclaration
ConvertMethod ( IMethod method ) : MethodDeclaration
ConvertNamespaceDeclaration ( INamespace ns ) : NamespaceDeclaration
ConvertOperator ( IMethod op ) : EntityDeclaration
ConvertProperty ( IProperty property ) : PropertyDeclaration
ConvertTypeDefinition ( ITypeDefinition typeDefinition ) : EntityDeclaration
ConvertTypeHelper ( IType type ) : AstType
ConvertTypeHelper ( ITypeDefinition typeDef, IList typeArguments ) : AstType
ConvertTypeParameter ( ITypeParameter tp ) : TypeParameterDeclaration
ConvertTypeParameterConstraint ( ITypeParameter tp ) : Constraint
GenerateBodyBlock ( ) : BlockStatement
GetExplicitInterfaceType ( IMember member ) : AstType
GetMemberModifiers ( IMember member ) : Modifiers
InitProperties ( ) : void
IsFlagsEnum ( ITypeDefinition type ) : bool
IsObjectOrValueType ( IType type ) : bool
IsValidNamespace ( string firstNamespacePart ) : bool
NeedsAccessibility ( IMember member ) : bool
TypeMatches ( IType type, ITypeDefinition typeDef, IList typeArguments ) : bool

Gets whether 'type' is the same as 'typeDef' parameterized with the given type arguments.

Method Details

ConvertAttribute() public method

public ConvertAttribute ( IAttribute attribute ) : Attribute
attribute IAttribute
return System.Attribute

ConvertConstantValue() public method

public ConvertConstantValue ( IType type, object constantValue ) : Expression
type IType
constantValue object
return Expression

ConvertConstantValue() public method

public ConvertConstantValue ( ResolveResult rr ) : Expression
rr ResolveResult
return Expression

ConvertEntity() public method

public ConvertEntity ( IEntity entity ) : EntityDeclaration
entity IEntity
return EntityDeclaration

ConvertNamespace() public method

public ConvertNamespace ( string namespaceName ) : AstType
namespaceName string
return AstType

ConvertParameter() public method

public ConvertParameter ( IParameter parameter ) : ParameterDeclaration
parameter IParameter
return ParameterDeclaration

ConvertSymbol() public method

public ConvertSymbol ( ISymbol symbol ) : AstNode
symbol ISymbol
return AstNode

ConvertType() public method

public ConvertType ( FullTypeName fullTypeName ) : AstType
fullTypeName FullTypeName
return AstType

ConvertType() public method

public ConvertType ( IType type ) : AstType
type IType
return AstType

ConvertVariable() public method

public ConvertVariable ( IVariable v ) : VariableDeclarationStatement
v IVariable
return VariableDeclarationStatement

ModifierFromAccessibility() public static method

public static ModifierFromAccessibility ( Accessibility accessibility ) : Modifiers
accessibility Accessibility
return Modifiers

TypeSystemAstBuilder() public method

Creates a new TypeSystemAstBuilder.
public TypeSystemAstBuilder ( ) : System
return System

TypeSystemAstBuilder() public method

Creates a new TypeSystemAstBuilder.
public TypeSystemAstBuilder ( CSharpResolver resolver ) : System
resolver ICSharpCode.NRefactory.CSharp.Resolver.CSharpResolver /// A resolver initialized for the position where the type will be inserted. ///
return System