RunicHostedDialogDecision class

Namespace Runic.Application.Views.Desktop in Runic.Application.Views.Desktop 0.23.0

public sealed class RunicHostedDialogDecision

A host policy's decision about a guest's dialog.

Remarks

Experimental; see docs/experimental.md.

Properties

IsAllowed

public bool IsAllowed { get; }

Whether the dialog shows.

Message

public string? Message { get; }

For a refusal, why, as the guest's failure message; it must not carry a secret.

Request

public RunicHostedDialogRequest? Request { get; }

The dialog that shows instead of the guest's, or null for the guest's.

Methods

Allow

public static RunicHostedDialogDecision Allow()

Shows the guest's dialog.

Returns

The decision.

Apply

public static RunicHostedDialogDecision Apply(RunicHostedDialogRequest request)

Shows a changed dialog instead, such as request with { InitialDirectory = … }. It keeps the request's RunicHostedDialogRequest.Kind and window; another kind or window fails the guest's dialog.

Parameters

request

The dialog to show.

Returns

The decision.

Refuse

public static RunicHostedDialogDecision Refuse(string? message = null)

Refuses the dialog: the guest receives PlatformFailureCode.PermissionDenied.

Parameters

message

Why, for the guest; at most 1,024 characters are sent.

Returns

The decision.