Skip to content

PluginEventWatchOptions

Class in Oadm.Sdk.Client · Oadm.Sdk.Client.dll

How one page watches its live events (PluginEventWatch): the waits and where the time comes from. A page keeps one as a property, so a test passes its own (a short wait or a fake time) instead of changing a static.

public sealed class PluginEventWatchOptions
Action<Exception>? Failed { get; init; }

A read that failed, an event that could not be applied or a stream that broke (never the cancellation that ends the watch), for a page that shows the reason; the watch goes on after the wait. Called on the context of the watch, usually the UI thread.

TimeSpan? MaxRetryDelay { get; init; }

Null: every wait is PluginEventWatchOptions.RetryDelay. Else the wait doubles after each round up to this, and starts again at PluginEventWatchOptions.RetryDelay once a round’s read worked (without a read: once an event arrived).

TimeSpan RetryDelay { get; init; }

Wait before reading and watching again after the stream ended or broke.

TimeProvider Time { get; init; }

The clock of the waits; tests pass a fake one.