C# 클래스 Microsoft.Languages.Core.Formatting.IndentBuilder

파일 보기 프로젝트 열기: Microsoft/RTVS 1 사용 예제들

공개 메소드들

메소드 설명
CloseIndentLevel ( ) : void
GetIndentString ( int size ) : string
GetIndentString ( int size, IndentType indentType, int tabSize ) : string

Calculates indentation string given indent size in characters, type of indent (tabs or spaces) and size of the tab,

GetLineIndentSize ( TextBuilder tb, int position, int tabSize ) : int

Determines indentation based on the leading whitespace in the current line.

GetWhiteSpaceCharLength ( char character, int spacesSoFar, int tabSize ) : int

Returns a conversion of tabs or space to space count. You can't simply get the tab size from options, because spaces before tabs blend in with the tabs, while spaces after the tabs add up.

IndentBuilder ( IndentType indentType, int indentSize, int tabSize ) : System
IndentBuilder ( IndentType indentType, int indentSize, int tabSize, string baseIndent ) : System
NewIndentLevel ( ) : void
ResetBaseIndent ( string baseIndent ) : Microsoft.Languages.Core.Formatting.IndentState
RestoreIndentState ( Microsoft.Languages.Core.Formatting.IndentState indentState ) : void
SetIndentLevel ( int indentLevel ) : void
SetIndentLevelForSize ( int indentSize ) : void
TextIndentInSpaces ( string text, int tabSize ) : int

Given text string (typically content of a text buffer) calculates size of indentation (length of the leading whitespace in the line) in spaces.

TextLengthInSpaces ( string text, int tabSize ) : int

Calculates length of text in spaces, converting tabs to spaces using specified tab size.

메소드 상세

CloseIndentLevel() 공개 메소드

public CloseIndentLevel ( ) : void
리턴 void

GetIndentString() 공개 메소드

public GetIndentString ( int size ) : string
size int
리턴 string

GetIndentString() 공개 정적인 메소드

Calculates indentation string given indent size in characters, type of indent (tabs or spaces) and size of the tab,
public static GetIndentString ( int size, IndentType indentType, int tabSize ) : string
size int Desired indent size in characters
indentType IndentType Type of indent
tabSize int Tab size
리턴 string

GetLineIndentSize() 공개 정적인 메소드

Determines indentation based on the leading whitespace in the current line.
public static GetLineIndentSize ( TextBuilder tb, int position, int tabSize ) : int
tb TextBuilder
position int
tabSize int
리턴 int

GetWhiteSpaceCharLength() 공개 정적인 메소드

Returns a conversion of tabs or space to space count. You can't simply get the tab size from options, because spaces before tabs blend in with the tabs, while spaces after the tabs add up.
public static GetWhiteSpaceCharLength ( char character, int spacesSoFar, int tabSize ) : int
character char
spacesSoFar int
tabSize int
리턴 int

IndentBuilder() 공개 메소드

public IndentBuilder ( IndentType indentType, int indentSize, int tabSize ) : System
indentType IndentType
indentSize int
tabSize int
리턴 System

IndentBuilder() 공개 메소드

public IndentBuilder ( IndentType indentType, int indentSize, int tabSize, string baseIndent ) : System
indentType IndentType
indentSize int
tabSize int
baseIndent string
리턴 System

NewIndentLevel() 공개 메소드

public NewIndentLevel ( ) : void
리턴 void

ResetBaseIndent() 공개 메소드

public ResetBaseIndent ( string baseIndent ) : Microsoft.Languages.Core.Formatting.IndentState
baseIndent string
리턴 Microsoft.Languages.Core.Formatting.IndentState

RestoreIndentState() 공개 메소드

public RestoreIndentState ( Microsoft.Languages.Core.Formatting.IndentState indentState ) : void
indentState Microsoft.Languages.Core.Formatting.IndentState
리턴 void

SetIndentLevel() 공개 메소드

public SetIndentLevel ( int indentLevel ) : void
indentLevel int
리턴 void

SetIndentLevelForSize() 공개 메소드

public SetIndentLevelForSize ( int indentSize ) : void
indentSize int
리턴 void

TextIndentInSpaces() 공개 정적인 메소드

Given text string (typically content of a text buffer) calculates size of indentation (length of the leading whitespace in the line) in spaces.
public static TextIndentInSpaces ( string text, int tabSize ) : int
text string
tabSize int
리턴 int

TextLengthInSpaces() 공개 정적인 메소드

Calculates length of text in spaces, converting tabs to spaces using specified tab size.
public static TextLengthInSpaces ( string text, int tabSize ) : int
text string
tabSize int
리턴 int