Table of Contents

Struct Secret

Namespace
DotNetDo
Assembly
DotNetDo.Core.dll

A secret with an available plaintext value.

public readonly record struct Secret : IEquatable<Secret>

Constructors

Secret(string)

Wraps and registers a plaintext value for log redaction.

public Secret(string value)

Parameters

value string

The non-null plaintext value. It is registered for redaction, but callers must still avoid writing it outside a redacting logger.

Properties

Description

Human-readable help text supplied by the task author.

public string? Description { get; }

Property Value

string?

Name

The configuration key, or null when the secret was constructed directly.

public string? Name { get; }

Property Value

string?

Methods

QuotedArgument()

Renders the resolved secret value as one quoted command-line argument.

public string QuotedArgument()

Returns

string

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()

Returns

string