DesktopInhibition class

Namespace Runic.Platform in Runic.Platform 0.23.0

public static class DesktopInhibition

Creates idle-power inhibition for a host or platform without a provider.

Methods

Unavailable

public static IDesktopInhibition Unavailable(PlatformUnavailableReason reason)

Creates inhibition that supports no effects and reports every acquisition unavailable for reason.

Exceptions

ArgumentOutOfRangeException

reason is not defined.

Remarks

Acquisition validates its arguments as a provider does, so a call that is wrong on one platform is wrong on every platform; otherwise nothing throws except caller cancellation.