C# Class ICSharpCode.NRefactory.CSharp.CSharpOutputVisitor

Outputs the AST.
Inheritance: IAstVisitor
Mostra file Open project: icsharpcode/NRefactory Class Usage Examples

Protected Properties

Property Type Description
containerStack Stack
isAtStartOfLine bool
policy CSharpFormattingOptions
writer TokenWriter

Public Methods

Method Description
CSharpOutputVisitor ( TextWriter textWriter, CSharpFormattingOptions formattingPolicy ) : System
CSharpOutputVisitor ( TokenWriter writer, CSharpFormattingOptions formattingPolicy ) : System
ConvertString ( string text ) : string

Converts special characters to escape sequences within the given string.

IsKeyword ( string identifier, AstNode context ) : bool

Determines whether the specified identifier is a keyword in the given context.

VisitAccessor ( Accessor accessor ) : void
VisitAnonymousMethodExpression ( AnonymousMethodExpression anonymousMethodExpression ) : void
VisitAnonymousTypeCreateExpression ( AnonymousTypeCreateExpression anonymousTypeCreateExpression ) : void
VisitArrayCreateExpression ( ArrayCreateExpression arrayCreateExpression ) : void
VisitArrayInitializerExpression ( ArrayInitializerExpression arrayInitializerExpression ) : void
VisitArraySpecifier ( ArraySpecifier arraySpecifier ) : void
VisitAsExpression ( AsExpression asExpression ) : void
VisitAssignmentExpression ( AssignmentExpression assignmentExpression ) : void
VisitAttribute ( Attribute attribute ) : void
VisitAttributeSection ( AttributeSection attributeSection ) : void
VisitBaseReferenceExpression ( BaseReferenceExpression baseReferenceExpression ) : void
VisitBinaryOperatorExpression ( BinaryOperatorExpression binaryOperatorExpression ) : void
VisitBlockStatement ( BlockStatement blockStatement ) : void
VisitBreakStatement ( BreakStatement breakStatement ) : void
VisitCSharpTokenNode ( CSharpTokenNode cSharpTokenNode ) : void
VisitCaseLabel ( CaseLabel caseLabel ) : void
VisitCastExpression ( CastExpression castExpression ) : void
VisitCatchClause ( CatchClause catchClause ) : void
VisitCheckedExpression ( CheckedExpression checkedExpression ) : void
VisitCheckedStatement ( CheckedStatement checkedStatement ) : void
VisitComment ( Comment comment ) : void
VisitComposedType ( ComposedType composedType ) : void
VisitConditionalExpression ( ConditionalExpression conditionalExpression ) : void
VisitConstraint ( Constraint constraint ) : void
VisitConstructorDeclaration ( ConstructorDeclaration constructorDeclaration ) : void
VisitConstructorInitializer ( ConstructorInitializer constructorInitializer ) : void
VisitContinueStatement ( ContinueStatement continueStatement ) : void
VisitCustomEventDeclaration ( CustomEventDeclaration customEventDeclaration ) : void
VisitDefaultValueExpression ( DefaultValueExpression defaultValueExpression ) : void
VisitDelegateDeclaration ( DelegateDeclaration delegateDeclaration ) : void
VisitDestructorDeclaration ( DestructorDeclaration destructorDeclaration ) : void
VisitDirectionExpression ( DirectionExpression directionExpression ) : void
VisitDoWhileStatement ( DoWhileStatement doWhileStatement ) : void
VisitDocumentationReference ( DocumentationReference documentationReference ) : void
VisitEmptyStatement ( EmptyStatement emptyStatement ) : void
VisitEnumMemberDeclaration ( EnumMemberDeclaration enumMemberDeclaration ) : void
VisitEventDeclaration ( EventDeclaration eventDeclaration ) : void
VisitExpressionStatement ( ExpressionStatement expressionStatement ) : void
VisitExternAliasDeclaration ( ExternAliasDeclaration externAliasDeclaration ) : void
VisitFieldDeclaration ( FieldDeclaration fieldDeclaration ) : void
VisitFixedFieldDeclaration ( FixedFieldDeclaration fixedFieldDeclaration ) : void
VisitFixedStatement ( FixedStatement fixedStatement ) : void
VisitFixedVariableInitializer ( FixedVariableInitializer fixedVariableInitializer ) : void
VisitForStatement ( ForStatement forStatement ) : void
VisitForeachStatement ( ForeachStatement foreachStatement ) : void
VisitGotoCaseStatement ( GotoCaseStatement gotoCaseStatement ) : void
VisitGotoDefaultStatement ( GotoDefaultStatement gotoDefaultStatement ) : void
VisitGotoStatement ( GotoStatement gotoStatement ) : void
VisitIdentifier ( Identifier identifier ) : void
VisitIdentifierExpression ( IdentifierExpression identifierExpression ) : void
VisitIfElseStatement ( IfElseStatement ifElseStatement ) : void
VisitIndexerDeclaration ( IndexerDeclaration indexerDeclaration ) : void
VisitIndexerExpression ( IndexerExpression indexerExpression ) : void
VisitInvocationExpression ( InvocationExpression invocationExpression ) : void
VisitIsExpression ( IsExpression isExpression ) : void
VisitLabelStatement ( LabelStatement labelStatement ) : void
VisitLambdaExpression ( LambdaExpression lambdaExpression ) : void
VisitLockStatement ( LockStatement lockStatement ) : void
VisitMemberReferenceExpression ( MemberReferenceExpression memberReferenceExpression ) : void
VisitMemberType ( MemberType memberType ) : void
VisitMethodDeclaration ( MethodDeclaration methodDeclaration ) : void
VisitNamedArgumentExpression ( NamedArgumentExpression namedArgumentExpression ) : void
VisitNamedExpression ( NamedExpression namedExpression ) : void
VisitNamespaceDeclaration ( NamespaceDeclaration namespaceDeclaration ) : void
VisitNewLine ( NewLineNode newLineNode ) : void
VisitNullReferenceExpression ( NullReferenceExpression nullReferenceExpression ) : void
VisitObjectCreateExpression ( ObjectCreateExpression objectCreateExpression ) : void
VisitOperatorDeclaration ( OperatorDeclaration operatorDeclaration ) : void
VisitParameterDeclaration ( ParameterDeclaration parameterDeclaration ) : void
VisitParenthesizedExpression ( ParenthesizedExpression parenthesizedExpression ) : void
VisitPatternPlaceholder ( AstNode placeholder, PatternMatching pattern ) : void
VisitPointerReferenceExpression ( PointerReferenceExpression pointerReferenceExpression ) : void
VisitPreProcessorDirective ( PreProcessorDirective preProcessorDirective ) : void
VisitPrimitiveExpression ( PrimitiveExpression primitiveExpression ) : void
VisitPrimitiveType ( PrimitiveType primitiveType ) : void
VisitPropertyDeclaration ( PropertyDeclaration propertyDeclaration ) : void
VisitQueryContinuationClause ( QueryContinuationClause queryContinuationClause ) : void
VisitQueryExpression ( QueryExpression queryExpression ) : void
VisitQueryFromClause ( QueryFromClause queryFromClause ) : void
VisitQueryGroupClause ( QueryGroupClause queryGroupClause ) : void
VisitQueryJoinClause ( QueryJoinClause queryJoinClause ) : void
VisitQueryLetClause ( QueryLetClause queryLetClause ) : void
VisitQueryOrderClause ( QueryOrderClause queryOrderClause ) : void
VisitQueryOrdering ( QueryOrdering queryOrdering ) : void
VisitQuerySelectClause ( QuerySelectClause querySelectClause ) : void
VisitQueryWhereClause ( QueryWhereClause queryWhereClause ) : void
VisitReturnStatement ( ReturnStatement returnStatement ) : void
VisitSimpleType ( SimpleType simpleType ) : void
VisitSizeOfExpression ( SizeOfExpression sizeOfExpression ) : void
VisitStackAllocExpression ( StackAllocExpression stackAllocExpression ) : void
VisitSwitchSection ( SwitchSection switchSection ) : void
VisitSwitchStatement ( SwitchStatement switchStatement ) : void
VisitSyntaxTree ( SyntaxTree syntaxTree ) : void
VisitText ( TextNode textNode ) : void
VisitThisReferenceExpression ( ThisReferenceExpression thisReferenceExpression ) : void
VisitThrowStatement ( ThrowStatement throwStatement ) : void
VisitTryCatchStatement ( TryCatchStatement tryCatchStatement ) : void
VisitTypeDeclaration ( TypeDeclaration typeDeclaration ) : void
VisitTypeOfExpression ( TypeOfExpression typeOfExpression ) : void
VisitTypeParameterDeclaration ( TypeParameterDeclaration typeParameterDeclaration ) : void
VisitTypeReferenceExpression ( TypeReferenceExpression typeReferenceExpression ) : void
VisitUnaryOperatorExpression ( UnaryOperatorExpression unaryOperatorExpression ) : void
VisitUncheckedExpression ( UncheckedExpression uncheckedExpression ) : void
VisitUncheckedStatement ( UncheckedStatement uncheckedStatement ) : void
VisitUndocumentedExpression ( UndocumentedExpression undocumentedExpression ) : void
VisitUnsafeStatement ( UnsafeStatement unsafeStatement ) : void
VisitUsingAliasDeclaration ( UsingAliasDeclaration usingAliasDeclaration ) : void
VisitUsingDeclaration ( UsingDeclaration usingDeclaration ) : void
VisitUsingStatement ( UsingStatement usingStatement ) : void
VisitVariableDeclarationStatement ( VariableDeclarationStatement variableDeclarationStatement ) : void
VisitVariableInitializer ( VariableInitializer variableInitializer ) : void
VisitWhileStatement ( WhileStatement whileStatement ) : void
VisitWhitespace ( WhitespaceNode whitespaceNode ) : void
VisitYieldBreakStatement ( YieldBreakStatement yieldBreakStatement ) : void
VisitYieldReturnStatement ( YieldReturnStatement yieldReturnStatement ) : void
WriteTypeParameters ( IEnumerable typeParameters ) : void

Protected Methods

Method Description
CanBeConfusedWithObjectInitializer ( Expression expr ) : bool
CloseBrace ( BraceStyle style ) : void
Comma ( AstNode nextNode, bool noSpaceAfterComma = false ) : void

Writes a comma.

EndNode ( AstNode node ) : void
IsObjectOrCollectionInitializer ( AstNode node ) : bool
LPar ( ) : void
LambdaNeedsParenthesis ( LambdaExpression lambdaExpression ) : bool
NewLine ( ) : void
OpenBrace ( BraceStyle style ) : void
OptionalComma ( AstNode pos ) : void

Writes an optional comma, e.g. at the end of an enum declaration or in an array initializer

OptionalSemicolon ( AstNode pos ) : void

Writes an optional semicolon, e.g. at the end of a type or namespace declaration.

PrintInitializerElements ( AstNodeCollection elements ) : void
RPar ( ) : void
Semicolon ( ) : void

Marks the end of a statement

Space ( bool addSpace = true ) : void

Writes a space depending on policy.

StartNode ( AstNode node ) : void
WriteAttributes ( IEnumerable attributes ) : void
WriteBlock ( BlockStatement blockStatement, BraceStyle style ) : void

Writes a block statement. Similar to VisitBlockStatement() except that: 1) it allows customizing the BraceStyle 2) it does not write a trailing newline after the '}' (this job is left to the caller)

WriteCommaSeparatedList ( IEnumerable list ) : void
WriteCommaSeparatedListInBrackets ( IEnumerable list ) : void
WriteCommaSeparatedListInBrackets ( IEnumerable list, bool spaceWithin ) : void
WriteCommaSeparatedListInParenthesis ( IEnumerable list, bool spaceWithin ) : void
WriteEmbeddedStatement ( Statement embeddedStatement, NewLinePlacement nlp = NewLinePlacement.NewLine ) : void

Writes an embedded statement.

Blocks may or may not write a leading newline depending on StatementBraceStyle. Non-blocks always write a leading newline.

WriteIdentifier ( Identifier identifier ) : void
WriteIdentifier ( string identifier ) : void
WriteKeyword ( TokenRole tokenRole ) : void

Writes a keyword, and all specials up to

WriteKeyword ( string token, Role tokenRole = null ) : void
WriteMethodBody ( BlockStatement body, BraceStyle style ) : void
WriteModifiers ( IEnumerable modifierTokens ) : void
WritePrivateImplementationType ( AstType privateImplementationType ) : void
WriteQualifiedIdentifier ( IEnumerable identifiers ) : void
WriteToken ( TokenRole tokenRole ) : void
WriteToken ( string token, Role tokenRole ) : void
WriteTypeArguments ( IEnumerable typeArguments ) : void

Private Methods

Method Description
IAstVisitor ( AstNode nullNode ) : void
MaybeNewLinesAfterUsings ( AstNode node ) : void
VisitAnyNode ( AnyNode anyNode ) : void
VisitBackreference ( Backreference backreference ) : void
VisitChoice ( Choice choice ) : void
VisitIdentifierExpressionBackreference ( IdentifierExpressionBackreference identifierExpressionBackreference ) : void
VisitNamedNode ( NamedNode namedNode ) : void
VisitNodeInPattern ( INode childNode ) : void
VisitOptionalNode ( OptionalNode optionalNode ) : void
VisitRepeat ( Repeat repeat ) : void
WriteCommaSeparatedList ( IEnumerable list ) : void
WriteCommaSeparatedList ( IEnumerable list ) : void
WriteCommaSeparatedListInParenthesis ( IEnumerable list, bool spaceWithin ) : void
WriteCommaSeparatedListInParenthesis ( IEnumerable list, bool spaceWithin ) : void

Method Details

CSharpOutputVisitor() public method

public CSharpOutputVisitor ( TextWriter textWriter, CSharpFormattingOptions formattingPolicy ) : System
textWriter System.IO.TextWriter
formattingPolicy CSharpFormattingOptions
return System

CSharpOutputVisitor() public method

public CSharpOutputVisitor ( TokenWriter writer, CSharpFormattingOptions formattingPolicy ) : System
writer TokenWriter
formattingPolicy CSharpFormattingOptions
return System

CanBeConfusedWithObjectInitializer() protected method

protected CanBeConfusedWithObjectInitializer ( Expression expr ) : bool
expr Expression
return bool

CloseBrace() protected method

protected CloseBrace ( BraceStyle style ) : void
style BraceStyle
return void

Comma() protected method

Writes a comma.
protected Comma ( AstNode nextNode, bool noSpaceAfterComma = false ) : void
nextNode AstNode The next node after the comma.
noSpaceAfterComma bool When set prevents printing a space after comma.
return void

ConvertString() public static method

Converts special characters to escape sequences within the given string.
public static ConvertString ( string text ) : string
text string
return string

EndNode() protected method

protected EndNode ( AstNode node ) : void
node AstNode
return void

IsKeyword() public static method

Determines whether the specified identifier is a keyword in the given context.
public static IsKeyword ( string identifier, AstNode context ) : bool
identifier string
context AstNode
return bool

IsObjectOrCollectionInitializer() protected method

protected IsObjectOrCollectionInitializer ( AstNode node ) : bool
node AstNode
return bool

LPar() protected method

protected LPar ( ) : void
return void

LambdaNeedsParenthesis() protected method

protected LambdaNeedsParenthesis ( LambdaExpression lambdaExpression ) : bool
lambdaExpression LambdaExpression
return bool

NewLine() protected method

protected NewLine ( ) : void
return void

OpenBrace() protected method

protected OpenBrace ( BraceStyle style ) : void
style BraceStyle
return void

OptionalComma() protected method

Writes an optional comma, e.g. at the end of an enum declaration or in an array initializer
protected OptionalComma ( AstNode pos ) : void
pos AstNode
return void

OptionalSemicolon() protected method

Writes an optional semicolon, e.g. at the end of a type or namespace declaration.
protected OptionalSemicolon ( AstNode pos ) : void
pos AstNode
return void

PrintInitializerElements() protected method

protected PrintInitializerElements ( AstNodeCollection elements ) : void
elements AstNodeCollection
return void

RPar() protected method

protected RPar ( ) : void
return void

Semicolon() protected method

Marks the end of a statement
protected Semicolon ( ) : void
return void

Space() protected method

Writes a space depending on policy.
protected Space ( bool addSpace = true ) : void
addSpace bool
return void

StartNode() protected method

protected StartNode ( AstNode node ) : void
node AstNode
return void

VisitAccessor() public method

public VisitAccessor ( Accessor accessor ) : void
accessor Accessor
return void

VisitAnonymousMethodExpression() public method

public VisitAnonymousMethodExpression ( AnonymousMethodExpression anonymousMethodExpression ) : void
anonymousMethodExpression AnonymousMethodExpression
return void

VisitAnonymousTypeCreateExpression() public method

public VisitAnonymousTypeCreateExpression ( AnonymousTypeCreateExpression anonymousTypeCreateExpression ) : void
anonymousTypeCreateExpression AnonymousTypeCreateExpression
return void

VisitArrayCreateExpression() public method

public VisitArrayCreateExpression ( ArrayCreateExpression arrayCreateExpression ) : void
arrayCreateExpression ArrayCreateExpression
return void

VisitArrayInitializerExpression() public method

public VisitArrayInitializerExpression ( ArrayInitializerExpression arrayInitializerExpression ) : void
arrayInitializerExpression ArrayInitializerExpression
return void

VisitArraySpecifier() public method

public VisitArraySpecifier ( ArraySpecifier arraySpecifier ) : void
arraySpecifier ArraySpecifier
return void

VisitAsExpression() public method

public VisitAsExpression ( AsExpression asExpression ) : void
asExpression AsExpression
return void

VisitAssignmentExpression() public method

public VisitAssignmentExpression ( AssignmentExpression assignmentExpression ) : void
assignmentExpression AssignmentExpression
return void

VisitAttribute() public method

public VisitAttribute ( Attribute attribute ) : void
attribute Attribute
return void

VisitAttributeSection() public method

public VisitAttributeSection ( AttributeSection attributeSection ) : void
attributeSection AttributeSection
return void

VisitBaseReferenceExpression() public method

public VisitBaseReferenceExpression ( BaseReferenceExpression baseReferenceExpression ) : void
baseReferenceExpression BaseReferenceExpression
return void

VisitBinaryOperatorExpression() public method

public VisitBinaryOperatorExpression ( BinaryOperatorExpression binaryOperatorExpression ) : void
binaryOperatorExpression BinaryOperatorExpression
return void

VisitBlockStatement() public method

public VisitBlockStatement ( BlockStatement blockStatement ) : void
blockStatement BlockStatement
return void

VisitBreakStatement() public method

public VisitBreakStatement ( BreakStatement breakStatement ) : void
breakStatement BreakStatement
return void

VisitCSharpTokenNode() public method

public VisitCSharpTokenNode ( CSharpTokenNode cSharpTokenNode ) : void
cSharpTokenNode CSharpTokenNode
return void

VisitCaseLabel() public method

public VisitCaseLabel ( CaseLabel caseLabel ) : void
caseLabel CaseLabel
return void

VisitCastExpression() public method

public VisitCastExpression ( CastExpression castExpression ) : void
castExpression CastExpression
return void

VisitCatchClause() public method

public VisitCatchClause ( CatchClause catchClause ) : void
catchClause CatchClause
return void

VisitCheckedExpression() public method

public VisitCheckedExpression ( CheckedExpression checkedExpression ) : void
checkedExpression CheckedExpression
return void

VisitCheckedStatement() public method

public VisitCheckedStatement ( CheckedStatement checkedStatement ) : void
checkedStatement CheckedStatement
return void

VisitComment() public method

public VisitComment ( Comment comment ) : void
comment Comment
return void

VisitComposedType() public method

public VisitComposedType ( ComposedType composedType ) : void
composedType ComposedType
return void

VisitConditionalExpression() public method

public VisitConditionalExpression ( ConditionalExpression conditionalExpression ) : void
conditionalExpression ConditionalExpression
return void

VisitConstraint() public method

public VisitConstraint ( Constraint constraint ) : void
constraint Constraint
return void

VisitConstructorDeclaration() public method

public VisitConstructorDeclaration ( ConstructorDeclaration constructorDeclaration ) : void
constructorDeclaration ConstructorDeclaration
return void

VisitConstructorInitializer() public method

public VisitConstructorInitializer ( ConstructorInitializer constructorInitializer ) : void
constructorInitializer ConstructorInitializer
return void

VisitContinueStatement() public method

public VisitContinueStatement ( ContinueStatement continueStatement ) : void
continueStatement ContinueStatement
return void

VisitCustomEventDeclaration() public method

public VisitCustomEventDeclaration ( CustomEventDeclaration customEventDeclaration ) : void
customEventDeclaration CustomEventDeclaration
return void

VisitDefaultValueExpression() public method

public VisitDefaultValueExpression ( DefaultValueExpression defaultValueExpression ) : void
defaultValueExpression DefaultValueExpression
return void

VisitDelegateDeclaration() public method

public VisitDelegateDeclaration ( DelegateDeclaration delegateDeclaration ) : void
delegateDeclaration DelegateDeclaration
return void

VisitDestructorDeclaration() public method

public VisitDestructorDeclaration ( DestructorDeclaration destructorDeclaration ) : void
destructorDeclaration DestructorDeclaration
return void

VisitDirectionExpression() public method

public VisitDirectionExpression ( DirectionExpression directionExpression ) : void
directionExpression DirectionExpression
return void

VisitDoWhileStatement() public method

public VisitDoWhileStatement ( DoWhileStatement doWhileStatement ) : void
doWhileStatement DoWhileStatement
return void

VisitDocumentationReference() public method

public VisitDocumentationReference ( DocumentationReference documentationReference ) : void
documentationReference DocumentationReference
return void

VisitEmptyStatement() public method

public VisitEmptyStatement ( EmptyStatement emptyStatement ) : void
emptyStatement EmptyStatement
return void

VisitEnumMemberDeclaration() public method

public VisitEnumMemberDeclaration ( EnumMemberDeclaration enumMemberDeclaration ) : void
enumMemberDeclaration EnumMemberDeclaration
return void

VisitEventDeclaration() public method

public VisitEventDeclaration ( EventDeclaration eventDeclaration ) : void
eventDeclaration EventDeclaration
return void

VisitExpressionStatement() public method

public VisitExpressionStatement ( ExpressionStatement expressionStatement ) : void
expressionStatement ExpressionStatement
return void

VisitExternAliasDeclaration() public method

public VisitExternAliasDeclaration ( ExternAliasDeclaration externAliasDeclaration ) : void
externAliasDeclaration ExternAliasDeclaration
return void

VisitFieldDeclaration() public method

public VisitFieldDeclaration ( FieldDeclaration fieldDeclaration ) : void
fieldDeclaration FieldDeclaration
return void

VisitFixedFieldDeclaration() public method

public VisitFixedFieldDeclaration ( FixedFieldDeclaration fixedFieldDeclaration ) : void
fixedFieldDeclaration FixedFieldDeclaration
return void

VisitFixedStatement() public method

public VisitFixedStatement ( FixedStatement fixedStatement ) : void
fixedStatement FixedStatement
return void

VisitFixedVariableInitializer() public method

public VisitFixedVariableInitializer ( FixedVariableInitializer fixedVariableInitializer ) : void
fixedVariableInitializer FixedVariableInitializer
return void

VisitForStatement() public method

public VisitForStatement ( ForStatement forStatement ) : void
forStatement ForStatement
return void

VisitForeachStatement() public method

public VisitForeachStatement ( ForeachStatement foreachStatement ) : void
foreachStatement ForeachStatement
return void

VisitGotoCaseStatement() public method

public VisitGotoCaseStatement ( GotoCaseStatement gotoCaseStatement ) : void
gotoCaseStatement GotoCaseStatement
return void

VisitGotoDefaultStatement() public method

public VisitGotoDefaultStatement ( GotoDefaultStatement gotoDefaultStatement ) : void
gotoDefaultStatement GotoDefaultStatement
return void

VisitGotoStatement() public method

public VisitGotoStatement ( GotoStatement gotoStatement ) : void
gotoStatement GotoStatement
return void

VisitIdentifier() public method

public VisitIdentifier ( Identifier identifier ) : void
identifier Identifier
return void

VisitIdentifierExpression() public method

public VisitIdentifierExpression ( IdentifierExpression identifierExpression ) : void
identifierExpression IdentifierExpression
return void

VisitIfElseStatement() public method

public VisitIfElseStatement ( IfElseStatement ifElseStatement ) : void
ifElseStatement IfElseStatement
return void

VisitIndexerDeclaration() public method

public VisitIndexerDeclaration ( IndexerDeclaration indexerDeclaration ) : void
indexerDeclaration IndexerDeclaration
return void

VisitIndexerExpression() public method

public VisitIndexerExpression ( IndexerExpression indexerExpression ) : void
indexerExpression IndexerExpression
return void

VisitInvocationExpression() public method

public VisitInvocationExpression ( InvocationExpression invocationExpression ) : void
invocationExpression InvocationExpression
return void

VisitIsExpression() public method

public VisitIsExpression ( IsExpression isExpression ) : void
isExpression IsExpression
return void

VisitLabelStatement() public method

public VisitLabelStatement ( LabelStatement labelStatement ) : void
labelStatement LabelStatement
return void

VisitLambdaExpression() public method

public VisitLambdaExpression ( LambdaExpression lambdaExpression ) : void
lambdaExpression LambdaExpression
return void

VisitLockStatement() public method

public VisitLockStatement ( LockStatement lockStatement ) : void
lockStatement LockStatement
return void

VisitMemberReferenceExpression() public method

public VisitMemberReferenceExpression ( MemberReferenceExpression memberReferenceExpression ) : void
memberReferenceExpression MemberReferenceExpression
return void

VisitMemberType() public method

public VisitMemberType ( MemberType memberType ) : void
memberType MemberType
return void

VisitMethodDeclaration() public method

public VisitMethodDeclaration ( MethodDeclaration methodDeclaration ) : void
methodDeclaration MethodDeclaration
return void

VisitNamedArgumentExpression() public method

public VisitNamedArgumentExpression ( NamedArgumentExpression namedArgumentExpression ) : void
namedArgumentExpression NamedArgumentExpression
return void

VisitNamedExpression() public method

public VisitNamedExpression ( NamedExpression namedExpression ) : void
namedExpression NamedExpression
return void

VisitNamespaceDeclaration() public method

public VisitNamespaceDeclaration ( NamespaceDeclaration namespaceDeclaration ) : void
namespaceDeclaration NamespaceDeclaration
return void

VisitNewLine() public method

public VisitNewLine ( NewLineNode newLineNode ) : void
newLineNode NewLineNode
return void

VisitNullReferenceExpression() public method

public VisitNullReferenceExpression ( NullReferenceExpression nullReferenceExpression ) : void
nullReferenceExpression NullReferenceExpression
return void

VisitObjectCreateExpression() public method

public VisitObjectCreateExpression ( ObjectCreateExpression objectCreateExpression ) : void
objectCreateExpression ObjectCreateExpression
return void

VisitOperatorDeclaration() public method

public VisitOperatorDeclaration ( OperatorDeclaration operatorDeclaration ) : void
operatorDeclaration OperatorDeclaration
return void

VisitParameterDeclaration() public method

public VisitParameterDeclaration ( ParameterDeclaration parameterDeclaration ) : void
parameterDeclaration ParameterDeclaration
return void

VisitParenthesizedExpression() public method

public VisitParenthesizedExpression ( ParenthesizedExpression parenthesizedExpression ) : void
parenthesizedExpression ParenthesizedExpression
return void

VisitPatternPlaceholder() public method

public VisitPatternPlaceholder ( AstNode placeholder, PatternMatching pattern ) : void
placeholder AstNode
pattern PatternMatching
return void

VisitPointerReferenceExpression() public method

public VisitPointerReferenceExpression ( PointerReferenceExpression pointerReferenceExpression ) : void
pointerReferenceExpression PointerReferenceExpression
return void

VisitPreProcessorDirective() public method

public VisitPreProcessorDirective ( PreProcessorDirective preProcessorDirective ) : void
preProcessorDirective PreProcessorDirective
return void

VisitPrimitiveExpression() public method

public VisitPrimitiveExpression ( PrimitiveExpression primitiveExpression ) : void
primitiveExpression PrimitiveExpression
return void

VisitPrimitiveType() public method

public VisitPrimitiveType ( PrimitiveType primitiveType ) : void
primitiveType PrimitiveType
return void

VisitPropertyDeclaration() public method

public VisitPropertyDeclaration ( PropertyDeclaration propertyDeclaration ) : void
propertyDeclaration PropertyDeclaration
return void

VisitQueryContinuationClause() public method

public VisitQueryContinuationClause ( QueryContinuationClause queryContinuationClause ) : void
queryContinuationClause QueryContinuationClause
return void

VisitQueryExpression() public method

public VisitQueryExpression ( QueryExpression queryExpression ) : void
queryExpression QueryExpression
return void

VisitQueryFromClause() public method

public VisitQueryFromClause ( QueryFromClause queryFromClause ) : void
queryFromClause QueryFromClause
return void

VisitQueryGroupClause() public method

public VisitQueryGroupClause ( QueryGroupClause queryGroupClause ) : void
queryGroupClause QueryGroupClause
return void

VisitQueryJoinClause() public method

public VisitQueryJoinClause ( QueryJoinClause queryJoinClause ) : void
queryJoinClause QueryJoinClause
return void

VisitQueryLetClause() public method

public VisitQueryLetClause ( QueryLetClause queryLetClause ) : void
queryLetClause QueryLetClause
return void

VisitQueryOrderClause() public method

public VisitQueryOrderClause ( QueryOrderClause queryOrderClause ) : void
queryOrderClause QueryOrderClause
return void

VisitQueryOrdering() public method

public VisitQueryOrdering ( QueryOrdering queryOrdering ) : void
queryOrdering QueryOrdering
return void

VisitQuerySelectClause() public method

public VisitQuerySelectClause ( QuerySelectClause querySelectClause ) : void
querySelectClause QuerySelectClause
return void

VisitQueryWhereClause() public method

public VisitQueryWhereClause ( QueryWhereClause queryWhereClause ) : void
queryWhereClause QueryWhereClause
return void

VisitReturnStatement() public method

public VisitReturnStatement ( ReturnStatement returnStatement ) : void
returnStatement ReturnStatement
return void

VisitSimpleType() public method

public VisitSimpleType ( SimpleType simpleType ) : void
simpleType SimpleType
return void

VisitSizeOfExpression() public method

public VisitSizeOfExpression ( SizeOfExpression sizeOfExpression ) : void
sizeOfExpression SizeOfExpression
return void

VisitStackAllocExpression() public method

public VisitStackAllocExpression ( StackAllocExpression stackAllocExpression ) : void
stackAllocExpression StackAllocExpression
return void

VisitSwitchSection() public method

public VisitSwitchSection ( SwitchSection switchSection ) : void
switchSection SwitchSection
return void

VisitSwitchStatement() public method

public VisitSwitchStatement ( SwitchStatement switchStatement ) : void
switchStatement SwitchStatement
return void

VisitSyntaxTree() public method

public VisitSyntaxTree ( SyntaxTree syntaxTree ) : void
syntaxTree SyntaxTree
return void

VisitText() public method

public VisitText ( TextNode textNode ) : void
textNode TextNode
return void

VisitThisReferenceExpression() public method

public VisitThisReferenceExpression ( ThisReferenceExpression thisReferenceExpression ) : void
thisReferenceExpression ThisReferenceExpression
return void

VisitThrowStatement() public method

public VisitThrowStatement ( ThrowStatement throwStatement ) : void
throwStatement ThrowStatement
return void

VisitTryCatchStatement() public method

public VisitTryCatchStatement ( TryCatchStatement tryCatchStatement ) : void
tryCatchStatement TryCatchStatement
return void

VisitTypeDeclaration() public method

public VisitTypeDeclaration ( TypeDeclaration typeDeclaration ) : void
typeDeclaration TypeDeclaration
return void

VisitTypeOfExpression() public method

public VisitTypeOfExpression ( TypeOfExpression typeOfExpression ) : void
typeOfExpression TypeOfExpression
return void

VisitTypeParameterDeclaration() public method

public VisitTypeParameterDeclaration ( TypeParameterDeclaration typeParameterDeclaration ) : void
typeParameterDeclaration TypeParameterDeclaration
return void

VisitTypeReferenceExpression() public method

public VisitTypeReferenceExpression ( TypeReferenceExpression typeReferenceExpression ) : void
typeReferenceExpression TypeReferenceExpression
return void

VisitUnaryOperatorExpression() public method

public VisitUnaryOperatorExpression ( UnaryOperatorExpression unaryOperatorExpression ) : void
unaryOperatorExpression UnaryOperatorExpression
return void

VisitUncheckedExpression() public method

public VisitUncheckedExpression ( UncheckedExpression uncheckedExpression ) : void
uncheckedExpression UncheckedExpression
return void

VisitUncheckedStatement() public method

public VisitUncheckedStatement ( UncheckedStatement uncheckedStatement ) : void
uncheckedStatement UncheckedStatement
return void

VisitUndocumentedExpression() public method

public VisitUndocumentedExpression ( UndocumentedExpression undocumentedExpression ) : void
undocumentedExpression UndocumentedExpression
return void

VisitUnsafeStatement() public method

public VisitUnsafeStatement ( UnsafeStatement unsafeStatement ) : void
unsafeStatement UnsafeStatement
return void

VisitUsingAliasDeclaration() public method

public VisitUsingAliasDeclaration ( UsingAliasDeclaration usingAliasDeclaration ) : void
usingAliasDeclaration UsingAliasDeclaration
return void

VisitUsingDeclaration() public method

public VisitUsingDeclaration ( UsingDeclaration usingDeclaration ) : void
usingDeclaration UsingDeclaration
return void

VisitUsingStatement() public method

public VisitUsingStatement ( UsingStatement usingStatement ) : void
usingStatement UsingStatement
return void

VisitVariableDeclarationStatement() public method

public VisitVariableDeclarationStatement ( VariableDeclarationStatement variableDeclarationStatement ) : void
variableDeclarationStatement VariableDeclarationStatement
return void

VisitVariableInitializer() public method

public VisitVariableInitializer ( VariableInitializer variableInitializer ) : void
variableInitializer VariableInitializer
return void

VisitWhileStatement() public method

public VisitWhileStatement ( WhileStatement whileStatement ) : void
whileStatement WhileStatement
return void

VisitWhitespace() public method

public VisitWhitespace ( WhitespaceNode whitespaceNode ) : void
whitespaceNode WhitespaceNode
return void

VisitYieldBreakStatement() public method

public VisitYieldBreakStatement ( YieldBreakStatement yieldBreakStatement ) : void
yieldBreakStatement YieldBreakStatement
return void

VisitYieldReturnStatement() public method

public VisitYieldReturnStatement ( YieldReturnStatement yieldReturnStatement ) : void
yieldReturnStatement YieldReturnStatement
return void

WriteAttributes() protected method

protected WriteAttributes ( IEnumerable attributes ) : void
attributes IEnumerable
return void

WriteBlock() protected method

Writes a block statement. Similar to VisitBlockStatement() except that: 1) it allows customizing the BraceStyle 2) it does not write a trailing newline after the '}' (this job is left to the caller)
protected WriteBlock ( BlockStatement blockStatement, BraceStyle style ) : void
blockStatement BlockStatement
style BraceStyle
return void

WriteCommaSeparatedList() protected method

protected WriteCommaSeparatedList ( IEnumerable list ) : void
list IEnumerable
return void

WriteCommaSeparatedListInBrackets() protected method

protected WriteCommaSeparatedListInBrackets ( IEnumerable list ) : void
list IEnumerable
return void

WriteCommaSeparatedListInBrackets() protected method

protected WriteCommaSeparatedListInBrackets ( IEnumerable list, bool spaceWithin ) : void
list IEnumerable
spaceWithin bool
return void

WriteCommaSeparatedListInParenthesis() protected method

protected WriteCommaSeparatedListInParenthesis ( IEnumerable list, bool spaceWithin ) : void
list IEnumerable
spaceWithin bool
return void

WriteEmbeddedStatement() protected method

Writes an embedded statement.
Blocks may or may not write a leading newline depending on StatementBraceStyle. Non-blocks always write a leading newline.
protected WriteEmbeddedStatement ( Statement embeddedStatement, NewLinePlacement nlp = NewLinePlacement.NewLine ) : void
embeddedStatement Statement The statement to write.
nlp NewLinePlacement Determines whether a trailing newline should be written following a block. /// Non-blocks always write a trailing newline.
return void

WriteIdentifier() protected method

protected WriteIdentifier ( Identifier identifier ) : void
identifier Identifier
return void

WriteIdentifier() protected method

protected WriteIdentifier ( string identifier ) : void
identifier string
return void

WriteKeyword() protected method

Writes a keyword, and all specials up to
protected WriteKeyword ( TokenRole tokenRole ) : void
tokenRole TokenRole
return void

WriteKeyword() protected method

protected WriteKeyword ( string token, Role tokenRole = null ) : void
token string
tokenRole Role
return void

WriteMethodBody() protected method

protected WriteMethodBody ( BlockStatement body, BraceStyle style ) : void
body BlockStatement
style BraceStyle
return void

WriteModifiers() protected method

protected WriteModifiers ( IEnumerable modifierTokens ) : void
modifierTokens IEnumerable
return void

WritePrivateImplementationType() protected method

protected WritePrivateImplementationType ( AstType privateImplementationType ) : void
privateImplementationType AstType
return void

WriteQualifiedIdentifier() protected method

protected WriteQualifiedIdentifier ( IEnumerable identifiers ) : void
identifiers IEnumerable
return void

WriteToken() protected method

protected WriteToken ( TokenRole tokenRole ) : void
tokenRole TokenRole
return void

WriteToken() protected method

protected WriteToken ( string token, Role tokenRole ) : void
token string
tokenRole Role
return void

WriteTypeArguments() protected method

protected WriteTypeArguments ( IEnumerable typeArguments ) : void
typeArguments IEnumerable
return void

WriteTypeParameters() public method

public WriteTypeParameters ( IEnumerable typeParameters ) : void
typeParameters IEnumerable
return void

Property Details

containerStack protected_oe property

protected Stack containerStack
return Stack

isAtStartOfLine protected_oe property

protected bool isAtStartOfLine
return bool

policy protected_oe property

protected CSharpFormattingOptions policy
return CSharpFormattingOptions

writer protected_oe property

protected TokenWriter writer
return TokenWriter