C# 클래스 ServiceClientGenerator.CodeBuilder

Wrapper around string builder to help emit properly indented code
파일 보기 프로젝트 열기: aws/aws-sdk-net 1 사용 예제들

공개 메소드들

메소드 설명
Append ( string s ) : CodeBuilder

Append a string at the current location

AppendFormat ( string format ) : CodeBuilder

Append a formatted string at the current location.

AppendLine ( ) : CodeBuilder

Add a newline, and indent to the current indent

AppendLine ( string line ) : CodeBuilder

Append a string at the current location, add a newline and indent to the current indent.

AppendQuote ( string s, string open = @"""", string close = null ) : CodeBuilder

Append a string with quotes around it.

CloseBlock ( ) : CodeBuilder

Add a newline, reduce the indent by the tab width, and add a '}'

CodeBuilder ( StringBuilder sb, int startingIndent, int tabWidth = 4 ) : System

Constructor.

OpenBlock ( ) : CodeBuilder

Increase the indent and open a block, adding a '{' and a newline and indent.

The current position will be on a new line at the newly increased indent.

메소드 상세

Append() 공개 메소드

Append a string at the current location
public Append ( string s ) : CodeBuilder
s string a string
리턴 CodeBuilder

AppendFormat() 공개 메소드

Append a formatted string at the current location.
public AppendFormat ( string format ) : CodeBuilder
format string Format string
리턴 CodeBuilder

AppendLine() 공개 메소드

Add a newline, and indent to the current indent
public AppendLine ( ) : CodeBuilder
리턴 CodeBuilder

AppendLine() 공개 메소드

Append a string at the current location, add a newline and indent to the current indent.
public AppendLine ( string line ) : CodeBuilder
line string
리턴 CodeBuilder

AppendQuote() 공개 메소드

Append a string with quotes around it.
public AppendQuote ( string s, string open = @"""", string close = null ) : CodeBuilder
s string The string
open string The opening quote character. Defaults to double quotes.
close string The closing quote character. Defaults to the open character.
리턴 CodeBuilder

CloseBlock() 공개 메소드

Add a newline, reduce the indent by the tab width, and add a '}'
public CloseBlock ( ) : CodeBuilder
리턴 CodeBuilder

CodeBuilder() 공개 메소드

Constructor.
public CodeBuilder ( StringBuilder sb, int startingIndent, int tabWidth = 4 ) : System
sb StringBuilder StringBuilder instance to wrap
startingIndent int Staring indent width (in spaces)
tabWidth int Additional indent width (in spaces)
리턴 System

OpenBlock() 공개 메소드

Increase the indent and open a block, adding a '{' and a newline and indent.
The current position will be on a new line at the newly increased indent.
public OpenBlock ( ) : CodeBuilder
리턴 CodeBuilder