Class ExportStringBuilder
An export string builder.
Inheritance
Namespace: Microsoft.Health.Fhir.SpecManager.Language
Assembly: Microsoft.Health.Fhir.SpecManager.dll
Syntax
public class ExportStringBuilder : object
Constructors
| Improve this Doc View SourceExportStringBuilder()
Initializes a new instance of the Export
Declaration
public ExportStringBuilder()
Properties
| Improve this Doc View SourceCharactersPerIndentation
Gets the characters per indentation level.
Declaration
public int CharactersPerIndentation { get; }
Property Value
Type | Description |
---|---|
System. |
Indentation
Gets the current level of indentation.
Declaration
public int Indentation { get; }
Property Value
Type | Description |
---|---|
System. |
IndentationChar
Gets the indentation character.
Declaration
public char IndentationChar { get; }
Property Value
Type | Description |
---|---|
System. |
Methods
| Improve this Doc View SourceAppend(ExportStringBuilder)
Appends a sb.
Declaration
public void Append(ExportStringBuilder sb)
Parameters
Type | Name | Description |
---|---|---|
Export |
sb | The string builder. |
CloseScope(String)
Closes a scope (decreases indent, then writes literal on a line).
Declaration
public void CloseScope(string closeLiteral = "}")
Parameters
Type | Name | Description |
---|---|---|
System. |
closeLiteral | (Optional) The close literal. |
DecreaseIndent()
Decrease indent.
Declaration
public void DecreaseIndent()
IncreaseIndent()
Increase indent.
Declaration
public void IncreaseIndent()
OpenScope(String)
Opens a scope (writes literal on a line, then indents).
Declaration
public void OpenScope(string openLiteral = "{")
Parameters
Type | Name | Description |
---|---|---|
System. |
openLiteral | (Optional) The scope open literal. |
ReopenScope(String)
Reopens a scope (decreases indent, writes a literal, then increases indent).
Declaration
public void ReopenScope(string literal)
Parameters
Type | Name | Description |
---|---|---|
System. |
literal | The literal. |
SetCharsPerIndentation(Int32)
Sets characters per indentation.
Declaration
public void SetCharsPerIndentation(int charsPerIndentLevel)
Parameters
Type | Name | Description |
---|---|---|
System. |
charsPerIndentLevel | The characters per indent level. |
SetIndent(Int32)
Sets an indent.
Declaration
public void SetIndent(int level)
Parameters
Type | Name | Description |
---|---|---|
System. |
level | The level. |
SetIndentationChar(Char)
Sets indentation character.
Declaration
public void SetIndentationChar(char indentChar)
Parameters
Type | Name | Description |
---|---|---|
System. |
indentChar | The indent character. |
ToString()
Returns a string that represents the current object.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System. |
A string that represents the current object. |
Write(String)
Writes.
Declaration
public void Write(string value)
Parameters
Type | Name | Description |
---|---|---|
System. |
value | The value. |
WriteIndented(String)
Writes a value, indented.
Declaration
public void WriteIndented(string value)
Parameters
Type | Name | Description |
---|---|---|
System. |
value | The value. |
WriteLine(String)
Writes a line.
Declaration
public void WriteLine(string value)
Parameters
Type | Name | Description |
---|---|---|
System. |
value | The value. |
WriteLineIndented(String)
Writes a value, indented.
Declaration
public void WriteLineIndented(string value)
Parameters
Type | Name | Description |
---|---|---|
System. |
value | The value. |