Skip to content
ConsoleMonster
Class

ChangePreviewOptions

ConsoleMonster.Changes

Namespace
ConsoleMonster.Changes
Assembly
ConsoleMonster
Modifiers
sealed
Attributes
Fluent

Options for ChangePreview.Confirm.

Inheritance

  • object
  • ChangePreviewOptions

Usage

Explore 27 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

Accepted by parameters 15

Constructors

public ChangePreviewOptions() #

Properties

public string? Title { get; set; } #

A title above the preview (markup), or null.

public ChangeViewMode Mode { get; set; } #

The view of the changes (default ChangeViewMode.Full).

public string? Question { get; set; } #

The question, or null for "Apply these changes?" in the current language.

public string? TypedConfirmation { get; set; } #

Text the user must type to confirm (for example a server name), or null.

public bool TypedWhenDestructive { get; set; } #

Whether changes that remove objects need a typed confirmation when ChangePreviewOptions.TypedConfirmation is not set: the user types the number of removals (default true).

public InteractiveOptions? Interactive { get; set; } #

Prompt options (input, target, labels), or null for the defaults.

Extension Methods

Interactive 2 overloads
public static ChangePreviewOptions Interactive(ChangePreviewOptions changePreviewOptions, InteractiveOptions? value) #

Sets ChangePreviewOptions.Interactive: Prompt options (input, target, labels), or null for the defaults.

Parameters

changePreviewOptions ConsoleMonster.Changes.ChangePreviewOptions required
The instance.
value ConsoleMonster.Interactive.InteractiveOptions? required
The value.

Returns

ChangePreviewOptions The same instance.

Examples

// C# initializer or property                                                       // C# fluent
new global::ConsoleMonster.Changes.ChangePreviewOptions { Interactive = value };    changePreviewOptions.Interactive(value);
public static ChangePreviewOptions Interactive(ChangePreviewOptions changePreviewOptions, Action<InteractiveOptions> configure) #

Configures ChangePreviewOptions.Interactive in place (creating it when not set): Prompt options (input, target, labels), or null for the defaults.

Parameters

changePreviewOptions ConsoleMonster.Changes.ChangePreviewOptions required
The instance.
configure System.Action<ConsoleMonster.Interactive.InteractiveOptions> required
Configures the value.

Returns

ChangePreviewOptions The same instance.
public static ChangePreviewOptions Mode(ChangePreviewOptions changePreviewOptions, ChangeViewMode value) #

Sets ChangePreviewOptions.Mode: The view of the changes (default ChangeViewMode.Full).

Parameters

changePreviewOptions ConsoleMonster.Changes.ChangePreviewOptions required
The instance.
value ConsoleMonster.Changes.ChangeViewMode required
The value.

Returns

ChangePreviewOptions The same instance.

Examples

// C# initializer or property                                                // C# fluent
new global::ConsoleMonster.Changes.ChangePreviewOptions { Mode = value };    changePreviewOptions.Mode(value);
public static ChangePreviewOptions Question(ChangePreviewOptions changePreviewOptions, string? value) #

Sets ChangePreviewOptions.Question: The question, or null for "Apply these changes?" in the current language.

Parameters

changePreviewOptions ConsoleMonster.Changes.ChangePreviewOptions required
The instance.
value string? required
The value.

Returns

ChangePreviewOptions The same instance.

Examples

// C# initializer or property                                                    // C# fluent
new global::ConsoleMonster.Changes.ChangePreviewOptions { Question = value };    changePreviewOptions.Question(value);
public static ChangePreviewOptions Title(ChangePreviewOptions changePreviewOptions, string? value) #

Sets ChangePreviewOptions.Title: A title above the preview (markup), or null.

Parameters

changePreviewOptions ConsoleMonster.Changes.ChangePreviewOptions required
The instance.
value string? required
The value.

Returns

ChangePreviewOptions The same instance.

Examples

// C# initializer or property                                                 // C# fluent
new global::ConsoleMonster.Changes.ChangePreviewOptions { Title = value };    changePreviewOptions.Title(value);
public static ChangePreviewOptions TypedConfirmation(ChangePreviewOptions changePreviewOptions, string? value) #

Sets ChangePreviewOptions.TypedConfirmation: Text the user must type to confirm (for example a server name), or null.

Parameters

changePreviewOptions ConsoleMonster.Changes.ChangePreviewOptions required
The instance.
value string? required
The value.

Returns

ChangePreviewOptions The same instance.

Examples

// C# initializer or property                                                             // C# fluent
new global::ConsoleMonster.Changes.ChangePreviewOptions { TypedConfirmation = value };    changePreviewOptions.TypedConfirmation(value);
public static ChangePreviewOptions TypedWhenDestructive(ChangePreviewOptions changePreviewOptions, bool value = true) #

Sets ChangePreviewOptions.TypedWhenDestructive: Whether changes that remove objects need a typed confirmation when ChangePreviewOptions.TypedConfirmation is not set: the user types the number of removals (default true).

Parameters

changePreviewOptions ConsoleMonster.Changes.ChangePreviewOptions required
The instance.
value bool = true optional
The value; true when omitted.

Returns

ChangePreviewOptions The same instance.

Examples

// C# initializer or property                                                                // C# fluent
new global::ConsoleMonster.Changes.ChangePreviewOptions { TypedWhenDestructive = value };    changePreviewOptions.TypedWhenDestructive(value);