Skip to content

IndentScope

Disposable scope that temporarily changes the indentation level. Restores the original indentation on disposal.

C# Signature
internal readonly struct IndentScope : System.IDisposable

Creates a new indent scope that temporarily changes the indentation level.

C# Signature
public IndentScope(CodeWriter writer, int newIndent);

The code writer to modify.

The indentation level to use within the scope.

Restores the original indentation level.

C# Signature
public void Dispose();