RunicHostedMenuDecision class

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

public sealed class RunicHostedMenuDecision

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

Remarks

Experimental; see docs/experimental.md.

Properties

IsAllowed

public bool IsAllowed { get; }

Whether the menus show.

Message

public string? Message { get; }

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

Request

public RunicHostedMenuRequest? Request { get; }

The menus that show instead of the guest's, or null for the guest's.

Methods

Allow

public static RunicHostedMenuDecision Allow()

Shows the guest's menus.

Returns

The decision.

Apply

public static RunicHostedMenuDecision Apply(RunicHostedMenuRequest request)

Shows changed menus instead, such as request with { Entries = … } without an item. The host shows them as they are, in the request's window, which must be the guest's; a menu bar's entries must all be DesktopMenus.

Parameters

request

The menus to show.

Returns

The decision.

Refuse

public static RunicHostedMenuDecision Refuse(string? message = null)

Refuses the menus: the guest receives PlatformFailureCode.PermissionDenied.

Parameters

message

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

Returns

The decision.