DesktopAvailabilityResult record

Namespace Runic.Desktop in Runic.Desktop 0.23.0

public sealed record DesktopAvailabilityResult : IEquatable<DesktopAvailabilityResult>

Inherits or implements IEquatable.

Reports the presentation hosts and prerequisites visible to the current process.

Parameters

Platform

The operating system: windows, macos, linux or unsupported.

Presentations

One entry per presentation, matched by DesktopPresentationAvailability.Browser; the list can grow.

Remarks

DesktopPlatform.GetAvailability creates it. Two results are equal when their members are, with the lists compared by value and order.

Constructors

DesktopAvailabilityResult

public DesktopAvailabilityResult(string Platform, IReadOnlyList<DesktopPresentationAvailability> Presentations)

Reports the presentation hosts and prerequisites visible to the current process.

Parameters

Platform

The operating system: windows, macos, linux or unsupported.

Presentations

One entry per presentation, matched by DesktopPresentationAvailability.Browser; the list can grow.

Remarks

DesktopPlatform.GetAvailability creates it. Two results are equal when their members are, with the lists compared by value and order.

Properties

Diagnostics

public IReadOnlyList<DesktopDiagnostic> Diagnostics { get; }

Gets every actionable missing-prerequisite diagnostic.

Embedded

public DesktopPresentationAvailability Embedded { get; }

Gets the embedded WebView presentation: the configured window host's, or the built-in one.

Remarks

The same as GetPresentation(BrowserKind.Embedded).

IsReady

public bool IsReady { get; }

Gets whether at least one presentation host is available.

LinuxBackends

public IReadOnlyList<LinuxEmbeddedBackendAvailability> LinuxBackends { get; init; }

Gets the GTK 3 and GTK 4 library discovery on Linux, to choose LinuxDesktopOptions.EmbeddedBackend; empty on other platforms. It does not depend on the options passed to DesktopPlatform.GetAvailability.

Platform

public string Platform { get; init; }

The operating system: windows, macos, linux or unsupported.

Presentations

public IReadOnlyList<DesktopPresentationAvailability> Presentations { get; init; }

Gets one entry per presentation, matched by DesktopPresentationAvailability.Browser; the list can grow.

Methods

Equals

public bool Equals(DesktopAvailabilityResult? other)

Compares every member, and the lists by value and order.

GetHashCode

public override int GetHashCode()

Inherits documentation from Object.GetHashCode.

GetPresentation

public DesktopPresentationAvailability GetPresentation(BrowserKind browser)

Gets the presentation a window requesting browser would use.

Parameters

browser

The requested presentation, as in DesktopWindowOptions.Browser.

Returns

The entry of BrowserKind.Embedded or a concrete browser. For BrowserKind.Any, the first available installed browser; for BrowserKind.ChromiumBased, the first available Chromium-based one. When there is none, an unavailable entry for browser: browser-unsupported for Safari and Opera, which Runic Desktop does not launch, otherwise presentation-unavailable. Never null.

Exceptions

ArgumentOutOfRangeException

browser is not a defined value.