Table of Contents

Method Dispose

Namespace
Ploch.CommandLine.Spectre
Assembly
Ploch.CommandLine.Spectre.dll

Dispose()

Releases the cancellation source and the Console.CancelKeyPress handler this builder owns.

public void Dispose()

Remarks

A builder created through Create(params IEnumerable<string>) owns both and releases both. A builder constructed with AppBuilder(ConsoleAppInfo, CancellationTokenSource) owns neither, so disposing it releases nothing and the caller's cancellation source is left intact; it still marks the builder disposed, so a later ConfigureCommandApp(Action<IConfigurator>) throws ObjectDisposedException.

Dispose(bool)

Releases the resources this builder owns.

protected virtual void Dispose(bool disposing)

Parameters

disposing bool

true when called from Dispose(); false when called from a finalizer, in which case the managed resources below must not be touched.