Table of Contents

Class WorkProgressTracker

Namespace
RDCore.SDK.Client.Progress
Assembly
RDCore.SDK.dll

The work a server reports the progress of to a client, as it goes: each piece begun, every step it reports, and its end - folded into where each piece stands (WorkProgressState), which is what a client shows.

public sealed class WorkProgressTracker
Inheritance
WorkProgressTracker
Inherited Members

Remarks

A piece of work is tracked by its token: one the server created for work of its own (window/workDoneProgress/create), or one the client gave a request for the work done for it (WorkDoneToken). Nothing is shown of a token until the server begins the work: it does not, for work that is done sooner than progress is worth reporting.

Changed is raised on whatever thread the progress arrives on: a client that draws it serializes the drawing itself.

Properties

Active

The work that is begun and not ended, in the order it began.

public IReadOnlyList<WorkProgressState> Active { get; }

Property Value

IReadOnlyList<WorkProgressState>

Methods

Track(ProgressToken, IObservable<WorkDoneProgress>, WorkProgressOrigin)

Tracks the progress reported to token.

public IDisposable Track(ProgressToken token, IObservable<WorkDoneProgress> progress, WorkProgressOrigin origin = WorkProgressOrigin.Request)

Parameters

token ProgressToken

The token.

progress IObservable<WorkDoneProgress>

What is reported to it.

origin WorkProgressOrigin

Whose work it is.

Returns

IDisposable

What stops the tracking: work that has not ended is taken for ended when it is disposed - the request it was for is answered, say.

Events

Changed

Raised when a piece of work begins, reports a step, or ends; with where it stands then.

public event Action<WorkProgressState>? Changed

Event Type

Action<WorkProgressState>