Show / Hide Table of Contents

# Class IndentedStringBuilder

A thin wrapper over System.Text.StringBuilder that adds indentation to each line built.

This type is typically used by database providers (and other extensions). It is generally not used in application code.

##### Inheritance

System.Object
IndentedStringBuilder

##### Inherited Members

System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)

###### Namespace: FFXIVClientStructs.InteropGenerator

###### Assembly: FFXIVClientStructs.InteropSourceGenerators.dll

##### Syntax

    public class IndentedStringBuilder

##### Remarks

See Implementation of database providers and extensions for more information and examples.

### Properties

| Improve this Doc View Source

#### IndentCount

Gets the current indent level.

##### Declaration

    public virtual int IndentCount { get; }

##### Property Value

Type | Description
--- | ---
System.Int32 | The current indent level.

| Improve this Doc View Source

#### Length

The current length of the built string.

##### Declaration

    public virtual int Length { get; }

##### Property Value

Type | Description
--- | ---
System.Int32 |

### Methods

| Improve this Doc View Source

#### Append(Char)

Appends the current indent and then the given char to the string being built.

##### Declaration

    public virtual IndentedStringBuilder Append(char value)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Char | value | The char to append.

##### Returns

Type | Description
--- | ---
IndentedStringBuilder | This builder so that additional calls can be chained.

| Improve this Doc View Source

#### Append(IEnumerable<Char>)

Appends the current indent and then the given chars to the string being built.

##### Declaration

    public virtual IndentedStringBuilder Append(IEnumerable<char> value)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Collections.Generic.IEnumerable<System.Char> | value | The chars to append.

##### Returns

Type | Description
--- | ---
IndentedStringBuilder | This builder so that additional calls can be chained.

| Improve this Doc View Source

#### Append(IEnumerable<String>)

Appends the current indent and then the given strings to the string being built.

##### Declaration

    public virtual IndentedStringBuilder Append(IEnumerable<string> value)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Collections.Generic.IEnumerable<System.String> | value | The strings to append.

##### Returns

Type | Description
--- | ---
IndentedStringBuilder | This builder so that additional calls can be chained.

| Improve this Doc View Source

#### Append(String)

Appends the current indent and then the given string to the string being built.

##### Declaration

    public virtual IndentedStringBuilder Append(string value)

##### Parameters

Type | Name | Description
--- | --- | ---
System.String | value | The string to append.

##### Returns

Type | Description
--- | ---
IndentedStringBuilder | This builder so that additional calls can be chained.

| Improve this Doc View Source

#### AppendLine()

Appends a new line to the string being built.

##### Declaration

    public virtual IndentedStringBuilder AppendLine()

##### Returns

Type | Description
--- | ---
IndentedStringBuilder | This builder so that additional calls can be chained.

| Improve this Doc View Source

#### AppendLine(String)

Appends the current indent, the given string, and a new line to the string being built.

##### Declaration

    public virtual IndentedStringBuilder AppendLine(string value)

##### Parameters

Type | Name | Description
--- | --- | ---
System.String | value | The string to append.

##### Returns

Type | Description
--- | ---
IndentedStringBuilder | This builder so that additional calls can be chained.

##### Remarks

If the given string itself contains a new line, the part of the string after that new line will not be indented.

| Improve this Doc View Source

#### AppendLines(String, Boolean)

Separates the given string into lines, and then appends each line, prefixed by the current indent and followed by a new line, to the string being built.

##### Declaration

    public virtual IndentedStringBuilder AppendLines(string value, bool skipFinalNewline = false)

##### Parameters

Type | Name | Description
--- | --- | ---
System.String | value | The string to append.
System.Boolean | skipFinalNewline | If true, then the terminating new line is not added after the last line.

##### Returns

Type | Description
--- | ---
IndentedStringBuilder | This builder so that additional calls can be chained.

| Improve this Doc View Source

#### Clear()

Resets this builder ready to build a new string.

##### Declaration

    public virtual IndentedStringBuilder Clear()

##### Returns

Type | Description
--- | ---
IndentedStringBuilder | This builder so that additional calls can be chained.

| Improve this Doc View Source

#### DecrementIndent()

Decrements the indent.

##### Declaration

    public virtual IndentedStringBuilder DecrementIndent()

##### Returns

Type | Description
--- | ---
IndentedStringBuilder | This builder so that additional calls can be chained.

| Improve this Doc View Source

#### IncrementIndent()

Increments the indent.

##### Declaration

    public virtual IndentedStringBuilder IncrementIndent()

##### Returns

Type | Description
--- | ---
IndentedStringBuilder | This builder so that additional calls can be chained.

| Improve this Doc View Source

#### Indent()

Creates a scoped indenter that will increment the indent, then decrement it when disposed.

##### Declaration

    public virtual IDisposable Indent()

##### Returns

Type | Description
--- | ---
System.IDisposable | An indenter.

| Improve this Doc View Source

#### SuspendIndent()

Temporarily disables all indentation. Restores the original indentation when the returned object is disposed.

##### Declaration

    public virtual IDisposable SuspendIndent()

##### Returns

Type | Description
--- | ---
System.IDisposable | An object that restores the original indentation when disposed.

| Improve this Doc View Source

#### ToString()

Returns the built string.

##### Declaration

    public override string ToString()

##### Returns

Type | Description
--- | ---
System.String | The built string.

##### Overrides

System.Object.ToString()