C# Class NArrange.Core.CodeWriteVisitor

Abstract code write visitor implementation.
Inheritance: ICodeElementVisitor
Mostra file Open project: MarcStan/NArrange

Public Methods

Method Description
VisitAttributeElement ( AttributeElement element ) : void

Processes an attribute element.

VisitCommentElement ( CommentElement element ) : void

Processes a comment element.

VisitConditionDirectiveElement ( ConditionDirectiveElement element ) : void

Processes a condition directive element.

VisitConstructorElement ( ConstructorElement element ) : void

Processes a constructor element.

VisitDelegateElement ( DelegateElement element ) : void

Processes a delegate element.

VisitEventElement ( EventElement element ) : void

Processes a event element.

VisitFieldElement ( FieldElement element ) : void

Processes a field element.

VisitGroupElement ( GroupElement element ) : void

Processes a group element.

VisitMethodElement ( MethodElement element ) : void

Processes a method element.

VisitNamespaceElement ( NamespaceElement element ) : void

Processes a namespace element.

VisitPropertyElement ( PropertyElement element ) : void

Processes a property element.

VisitRegionElement ( RegionElement element ) : void

Processes a region element.

VisitTypeElement ( TypeElement element ) : void

Processes a type element.

VisitUsingElement ( UsingElement element ) : void

Processes a using element.

Protected Methods

Method Description
CodeWriteVisitor ( TextWriter writer, CodeConfiguration configuration ) : System

Creates a new VBWriteVisitor.

FormatCommentText ( ICommentElement comment ) : string

Gets the formatted text to write for a comment.

WriteBlockChildren ( ICodeElement element ) : void

Writes children for a block element.

WriteChildren ( ICodeElement element ) : void

Writes child elements.

WriteClosingComment ( TextCodeElement element, string commentPrefix ) : void

Writes a closing comment.

WriteComments ( ReadOnlyCollection comments ) : void

Writes a collection of comment lines.

WriteIndented ( string text ) : void

Writes the specified text using the current TabCount.

WriteIndentedLine ( ) : void

Writes a new line using the current TabCount.

WriteIndentedLine ( string text ) : void

Writes a line of text using the current TabCount.

WriteRegionBeginDirective ( RegionElement element ) : void

Writes a starting region directive.

WriteRegionEndDirective ( RegionElement element ) : void

Writes an ending region directive.

WriteTextBlock ( string text ) : void

Writes a block of text.

Private Methods

Method Description
CreateTabWhitespace ( int tabCount ) : string

Creates whitespace for the specified number of tabs.

ProcessLineWhitepace ( string line, int &lineTabCount ) : string

Processes leading/trailing whitespace for a line of text.

Method Details

CodeWriteVisitor() protected method

Creates a new VBWriteVisitor.
protected CodeWriteVisitor ( TextWriter writer, CodeConfiguration configuration ) : System
writer System.IO.TextWriter The writer.
configuration NArrange.Core.Configuration.CodeConfiguration The configuration.
return System

FormatCommentText() protected method

Gets the formatted text to write for a comment.
protected FormatCommentText ( ICommentElement comment ) : string
comment ICommentElement Comment with text.
return string

VisitAttributeElement() public abstract method

Processes an attribute element.
public abstract VisitAttributeElement ( AttributeElement element ) : void
element NArrange.Core.CodeElements.AttributeElement Attribute code element.
return void

VisitCommentElement() public abstract method

Processes a comment element.
public abstract VisitCommentElement ( CommentElement element ) : void
element NArrange.Core.CodeElements.CommentElement Comment code element.
return void

VisitConditionDirectiveElement() public abstract method

Processes a condition directive element.
public abstract VisitConditionDirectiveElement ( ConditionDirectiveElement element ) : void
element NArrange.Core.CodeElements.ConditionDirectiveElement Condition directive code element.
return void

VisitConstructorElement() public abstract method

Processes a constructor element.
public abstract VisitConstructorElement ( ConstructorElement element ) : void
element NArrange.Core.CodeElements.ConstructorElement Constructor code element.
return void

VisitDelegateElement() public abstract method

Processes a delegate element.
public abstract VisitDelegateElement ( DelegateElement element ) : void
element NArrange.Core.CodeElements.DelegateElement Delegate code element.
return void

VisitEventElement() public abstract method

Processes a event element.
public abstract VisitEventElement ( EventElement element ) : void
element NArrange.Core.CodeElements.EventElement Event code element.
return void

VisitFieldElement() public abstract method

Processes a field element.
public abstract VisitFieldElement ( FieldElement element ) : void
element NArrange.Core.CodeElements.FieldElement Field code element.
return void

VisitGroupElement() public method

Processes a group element.
public VisitGroupElement ( GroupElement element ) : void
element NArrange.Core.CodeElements.GroupElement Group element.
return void

VisitMethodElement() public abstract method

Processes a method element.
public abstract VisitMethodElement ( MethodElement element ) : void
element NArrange.Core.CodeElements.MethodElement Method code element.
return void

VisitNamespaceElement() public abstract method

Processes a namespace element.
public abstract VisitNamespaceElement ( NamespaceElement element ) : void
element NArrange.Core.CodeElements.NamespaceElement Namespace code element.
return void

VisitPropertyElement() public abstract method

Processes a property element.
public abstract VisitPropertyElement ( PropertyElement element ) : void
element NArrange.Core.CodeElements.PropertyElement Property code element.
return void

VisitRegionElement() public method

Processes a region element.
public VisitRegionElement ( RegionElement element ) : void
element NArrange.Core.CodeElements.RegionElement Region code element.
return void

VisitTypeElement() public abstract method

Processes a type element.
public abstract VisitTypeElement ( TypeElement element ) : void
element NArrange.Core.CodeElements.TypeElement Type code element.
return void

VisitUsingElement() public abstract method

Processes a using element.
public abstract VisitUsingElement ( UsingElement element ) : void
element NArrange.Core.CodeElements.UsingElement Using/Import directive code element.
return void

WriteBlockChildren() protected method

Writes children for a block element.
protected WriteBlockChildren ( ICodeElement element ) : void
element ICodeElement Element whose children will be written.
return void

WriteChildren() protected method

Writes child elements.
protected WriteChildren ( ICodeElement element ) : void
element ICodeElement Element whose children will be written.
return void

WriteClosingComment() protected method

Writes a closing comment.
protected WriteClosingComment ( TextCodeElement element, string commentPrefix ) : void
element NArrange.Core.CodeElements.TextCodeElement The element.
commentPrefix string Comment prefix.
return void

WriteComments() protected method

Writes a collection of comment lines.
protected WriteComments ( ReadOnlyCollection comments ) : void
comments ReadOnlyCollection The comments.
return void

WriteIndented() protected method

Writes the specified text using the current TabCount.
protected WriteIndented ( string text ) : void
text string The text to write.
return void

WriteIndentedLine() protected method

Writes a new line using the current TabCount.
protected WriteIndentedLine ( ) : void
return void

WriteIndentedLine() protected method

Writes a line of text using the current TabCount.
protected WriteIndentedLine ( string text ) : void
text string The text to write.
return void

WriteRegionBeginDirective() protected abstract method

Writes a starting region directive.
protected abstract WriteRegionBeginDirective ( RegionElement element ) : void
element NArrange.Core.CodeElements.RegionElement The region element.
return void

WriteRegionEndDirective() protected abstract method

Writes an ending region directive.
protected abstract WriteRegionEndDirective ( RegionElement element ) : void
element NArrange.Core.CodeElements.RegionElement The region element.
return void

WriteTextBlock() protected method

Writes a block of text.
protected WriteTextBlock ( string text ) : void
text string Block of text to write.
return void