IndentScope
Disposable scope that temporarily changes the indentation level. Restores the original indentation on disposal.
internal readonly struct IndentScope : System.IDisposableConstructors
Section titled “Constructors”IndentScope(CodeWriter, int)
Section titled “IndentScope(CodeWriter, int)”Creates a new indent scope that temporarily changes the indentation level.
public IndentScope(CodeWriter writer, int newIndent);writer
Section titled “writer”The code writer to modify.
newIndent
Section titled “newIndent”The indentation level to use within the scope.
Methods
Section titled “Methods”Dispose()
Section titled “Dispose()”Restores the original indentation level.
public void Dispose();