RunicHostedPresentationDecision class

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

public sealed class RunicHostedPresentationDecision

A host policy's decision about a guest's presentation request.

Remarks

Experimental; see docs/experimental.md.

Properties

IsAllowed

public bool IsAllowed { get; }

Whether the request applies.

Message

public string? Message { get; }

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

Request

public RunicHostedPresentationRequest? Request { get; }

The request that applies instead of the guest's, or null for the guest's.

Methods

Allow

public static RunicHostedPresentationDecision Allow()

Applies the guest's request.

Returns

The decision.

Apply

public static RunicHostedPresentationDecision Apply(RunicHostedPresentationRequest request)

Applies a changed request instead, such as a clamped size: request with { Width = Math.Min(request.Width ?? 0, 1600) }. The host applies it as it is, to its RunicHostedPresentationRequest.Window, which must be a window of the same guest; another guest's window fails the guest's request.

Parameters

request

The request to apply.

Returns

The decision.

Refuse

public static RunicHostedPresentationDecision Refuse(string? message = null)

Refuses the request: the guest receives PlatformFailureCode.PermissionDenied.

Parameters

message

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

Returns

The decision.