ContainingTypesScope
Disposable scope that appends all containing types for a symbol. Opens the types on creation and closes them on disposal.
internal readonly struct ContainingTypesScope : System.IDisposableConstructors
Section titled “Constructors”ContainingTypesScope(CodeWriter, ISymbol, bool, bool)
Section titled “ContainingTypesScope(CodeWriter, ISymbol, bool, bool)”Creates a new containing types scope that appends all containing types for the specified symbol.
public ContainingTypesScope(CodeWriter writer, ISymbol symbol, bool appendNamespace = true, bool includeSelf = false);writer
Section titled “writer”The code writer to write to.
symbol
Section titled “symbol”The symbol whose containing types to append.
appendNamespace
Section titled “appendNamespace”If true, the namespace declaration will be appended.
includeSelf
Section titled “includeSelf”If true, the provided symbol will be included in the containing types. Keep false to write your own type declaration for the provided symbol.
Methods
Section titled “Methods”Dispose()
Section titled “Dispose()”Closes all containing type blocks and restores indentation.
public void Dispose();