RunicTestDialogRequest record

Namespace Runic.Application.Testing in Runic.Application.Testing 0.23.0

public sealed record RunicTestDialogRequest : IEquatable<RunicTestDialogRequest>

Inherits or implements IEquatable.

A dialog or context menu a guest asked a RunicTestHost to show for one of its windows (dialogs/1, menus/1).

Parameters

WindowId

The window's id.

Kind

What the guest asks for: a file dialog's kind, a message box or a context menu.

Message

The whole request as the guest sent it, with its members such as dialog, buttons or menu.

Constructors

RunicTestDialogRequest

public RunicTestDialogRequest(string WindowId, RunicTestDialogKind Kind, JsonElement Message)

A dialog or context menu a guest asked a RunicTestHost to show for one of its windows (dialogs/1, menus/1).

Parameters

WindowId

The window's id.

Kind

What the guest asks for: a file dialog's kind, a message box or a context menu.

Message

The whole request as the guest sent it, with its members such as dialog, buttons or menu.

Properties

ButtonIds

public IReadOnlyList<string> ButtonIds { get; }

The ids of a message box's buttons, in the guest's order; empty for one OK button or another kind.

Detail

public string? Detail { get; }

A message box's detail, or null.

FilterNames

public IReadOnlyList<string> FilterNames { get; }

The names of a file dialog's filters, in order: the index of one is what RunicTestDialogAnswer.Select chooses.

InitialDirectory

public string? InitialDirectory { get; }

The directory a file dialog opens in, or null.

Kind

public RunicTestDialogKind Kind { get; init; }

What the guest asks for: a file dialog's kind, a message box or a context menu.

Message

public JsonElement Message { get; init; }

The whole request as the guest sent it, with its members such as dialog, buttons or menu.

SuggestedName

public string? SuggestedName { get; }

The file name a save dialog suggests, or null for another kind.

Text

public string? Text { get; }

A message box's message, or null for another kind.

Title

public string? Title { get; }

A dialog's or message box's title, or null for the platform's own.

WindowId

public string WindowId { get; init; }

The window's id.