Table of Contents

Class TigerCliEditLoad<TSettings>

Namespace
ItTiger.TigerCli.Commands
Assembly
ItTiger.TigerCli.dll
Result of an edit-command loader. Produced by an app loader registered through AsEdit<TSettings>(Func<TSettings, Task<TigerCliEditLoad<TSettings>>>). Use Found(TSettings) to supply the existing object's values, or NotFound() when no matching object exists. On NotFound() the framework reports an invalid-arguments error and the command handler does not run.
public sealed class TigerCliEditLoad<TSettings> where TSettings : TigerCliSettings

Type Parameters

TSettings
The command settings type.
Inheritance
TigerCliEditLoad<TSettings>
Inherited Members

Remarks

The loader receives the bound settings after selector arguments and command-line overrides have been applied. It is not given a cancellation token parameter; exceptions from the loader flow through the normal command run failure path.

Properties

Existing

The existing object's values, or null when IsFound is false. The framework copies these values into the live settings for every property that was not supplied on the command line.
public TSettings? Existing { get; }

Property Value

TSettings

IsFound

True when an existing object was found and its values are available.
public bool IsFound { get; }

Property Value

bool

Methods

Found(TSettings)

Indicates the existing object was found. existing carries the current values to seed the edit; command-line values still win over them.
public static TigerCliEditLoad<TSettings> Found(TSettings existing)

Parameters

existing TSettings

Returns

TigerCliEditLoad<TSettings>

NotFound()

Indicates no matching object was found; the framework reports an error.
public static TigerCliEditLoad<TSettings> NotFound()

Returns

TigerCliEditLoad<TSettings>