public abstract class DesktopSettingsSource : IDesktopSettings, IAsyncDisposable Bounded, non-overlapping preference observation, including backend recovery.
Constructors
DesktopSettingsSource
protected DesktopSettingsSource() No documentation.
Methods
CloseCoreAsync
protected virtual ValueTask CloseCoreAsync() Releases native observation after disposal has drained every read.
DisposeAsync
public ValueTask DisposeAsync() Inherits documentation from IAsyncDisposable.DisposeAsync.
NextChange
protected virtual Task? NextChange() Returns a task that completes after the next native change, or null to poll once per second.
Remarks
Called before each watched read, so a change during that read completes the returned task.
ReadAsync
public ValueTask<PlatformResult<DesktopAppearance>> ReadAsync(CancellationToken cancellationToken = default) Reads the current native preferences.
Documentation from IDesktopSettings.ReadAsync.
ReadCoreAsync
protected abstract ValueTask<PlatformResult<DesktopAppearance>> ReadCoreAsync(CancellationToken cancellationToken) Reads one native snapshot and drains any submitted native callback before returning.
WatchAsync
public IAsyncEnumerable<PlatformResult<DesktopAppearance>> WatchAsync(CancellationToken cancellationToken = default) Emits an initial value and subsequent changes, including unavailability/recovery.
Documentation from IDesktopSettings.WatchAsync.