Method | Description | |
---|---|---|
Append ( string s ) : |
Append a string at the current location
|
|
AppendFormat ( string format ) : |
Append a formatted string at the current location.
|
|
AppendLine ( ) : |
Add a newline, and indent to the current indent
|
|
AppendLine ( string line ) : |
Append a string at the current location, add a newline and indent to the current indent.
|
|
AppendQuote ( string s, string open = @"""", string close = null ) : |
Append a string with quotes around it.
|
|
CloseBlock ( ) : |
Add a newline, reduce the indent by the tab width, and add a '}'
|
|
CodeBuilder ( StringBuilder sb, int startingIndent, int tabWidth = 4 ) : System |
Constructor.
|
|
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 Append ( string s ) : |
||
s | string | a string |
return |
public AppendFormat ( string format ) : |
||
format | string | Format string |
return |
public AppendLine ( string line ) : |
||
line | string | |
return |
public AppendQuote ( string s, string open = @"""", string close = null ) : |
||
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. |
return |
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) |
return | System |