Struct OptionalSecret
- Namespace
- DotNetDo
- Assembly
- DotNetDo.Core.dll
An optional string parameter that masks its value in text and logs.
public readonly record struct OptionalSecret : IEquatable<OptionalSecret>Properties
Description
Human-readable help text supplied by the task author.
public string? Description { get; }Property Value
Name
The parameter name, or null when constructed directly.
public string? Name { get; }Property Value
Methods
QuotedArgument()
Renders the resolved optional secret value as one quoted command-line argument.
public string? QuotedArgument()Returns
Required()
Converts the optional parameter to its required form, prompting with masked input during an interactive local build or throwing when no value is available.
public Secret Required()Returns
ToString()
Returns the fully qualified type name of this instance.
public override string ToString()Returns
- string
-
The fully qualified type name.
Unwrap()
Returns the plaintext secret value; callers must avoid writing it to unredacted output.
public string? Unwrap()