public sealed class RunicTestDialogAnswer How the user of a RunicTestHost answers a dialog or context menu (RunicTestHostOptions.FileDialog, RunicTestHostOptions.MessageBox, RunicTestHostOptions.ContextMenu), or how the host's platform or policy turns it away.
Methods
Choose
public static RunicTestDialogAnswer Choose(string? id) The user chose a message box's button or a context menu's item, by its id; null for none.
Parameters
idThe id, such as from
RunicTestHostedWindow.FindMenuItem.
Returns
The answer.
Dismiss
public static RunicTestDialogAnswer Dismiss() The user closed the dialog or menu without a choice: a file dialog is dismissed, a box returns no button.
Returns
The answer.
Fail
public static RunicTestDialogAnswer Fail(PlatformFailureCode code) The host's platform failed to show it, with a failure code (a failed outcome).
Parameters
codeThe code.
Returns
The answer.
Refuse
public static RunicTestDialogAnswer Refuse(string? message = null) The host's policy refuses it (rejected, refused): the guest receives PlatformFailureCode.PermissionDenied.
Parameters
messageWhy, for the guest.
Returns
The answer.
Select
public static RunicTestDialogAnswer Select(IReadOnlyList<string> paths, int? filter = null) The user selected files or directories in a file dialog, and the filter of the index in RunicTestDialogRequest.FilterNames.
Parameters
pathsThe absolute paths, at least one.
filterThe index of the filter the user chose, or
null.
Returns
The answer.
Exceptions
ArgumentExceptionA path is not absolute, or there is none.
Unavailable
public static RunicTestDialogAnswer Unavailable(PlatformUnavailableReason reason) The host could not show it (an unavailable outcome), such as PlatformUnavailableReason.OwnerClosed.
Parameters
reasonThe reason.
Returns
The answer.