C# 클래스 ICSharpCode.NRefactory.CSharp.CSharpFormatter

The C# Formatter generates a set of text replace actions to format a region in a C# document.
파일 보기 프로젝트 열기: 0xd4d/NRefactory 1 사용 예제들

공개 메소드들

메소드 설명
AddFormattingRegion ( DomRegion region ) : void

Adds a region in the document that should be formatted.

AnalyzeFormatting ( IDocument document, SyntaxTree syntaxTree, CancellationToken token = default(CancellationToken) ) : FormattingChanges

Analyzes the formatting of a given document and syntax tree.

CSharpFormatter ( CSharpFormattingOptions policy, ICSharpCode.NRefactory.CSharp.TextEditorOptions options = null ) : System

Initializes a new instance of the ICSharpCode.NRefactory.CSharp.CSharpFormatter class.

Format ( IDocument document ) : string

Format the specified document and gives back the formatted text as result.

Format ( string text ) : string

Format the specified text and gives back the formatted text as result.

비공개 메소드들

메소드 설명
InternalFormat ( IDocument document ) : string

메소드 상세

AddFormattingRegion() 공개 메소드

Adds a region in the document that should be formatted.
public AddFormattingRegion ( DomRegion region ) : void
region DomRegion
리턴 void

AnalyzeFormatting() 공개 메소드

Analyzes the formatting of a given document and syntax tree.
public AnalyzeFormatting ( IDocument document, SyntaxTree syntaxTree, CancellationToken token = default(CancellationToken) ) : FormattingChanges
document IDocument Document.
syntaxTree SyntaxTree Syntax tree.
token System.Threading.CancellationToken The cancellation token.
리턴 FormattingChanges

CSharpFormatter() 공개 메소드

Initializes a new instance of the ICSharpCode.NRefactory.CSharp.CSharpFormatter class.
public CSharpFormatter ( CSharpFormattingOptions policy, ICSharpCode.NRefactory.CSharp.TextEditorOptions options = null ) : System
policy CSharpFormattingOptions The formatting policy to use.
options ICSharpCode.NRefactory.CSharp.TextEditorOptions The text editor options (optional). Default is: TextEditorOptions.Default
리턴 System

Format() 공개 메소드

Format the specified document and gives back the formatted text as result.
public Format ( IDocument document ) : string
document IDocument
리턴 string

Format() 공개 메소드

Format the specified text and gives back the formatted text as result.
public Format ( string text ) : string
text string
리턴 string