ConditionalScope
Disposable scope that appends #if CONDITION. Appends #endif on disposal.
internal readonly struct ConditionalScope : System.IDisposableConstructors
Section titled “Constructors”ConditionalScope(CodeWriter, string?)
Section titled “ConditionalScope(CodeWriter, string?)”Creates a new conditional scope.
public ConditionalScope(CodeWriter writer, string? condition);writer
Section titled “writer”The code writer to modify.
condition
Section titled “condition”The condition to append.
Methods
Section titled “Methods”Dispose()
Section titled “Dispose()”Closes the conditional.
public void Dispose();