Interface IWorkProgressReporter
Reports the progress of a server's work to its client (LSP 3.17 §Work Done Progress, §window/workDoneProgress/create, §$/progress): of work done for a request that gave a token for it (WorkDoneToken), and of work the server begins of its own.
public interface IWorkProgressReporter
Remarks
Progress is for work that takes longer than an answer does (Threshold): work that is done sooner is reported nothing of at all - no token is created for it, and its client sees no progress flicker in and out. Work that is still going on then begins, with the last step it reported, and every step after; and once begun, it ends, whatever comes of it.
A client that gave no token, or one that does not support progress (window.workDoneProgress), is reported nothing: the work is done all the same.
Properties
Threshold
How long work goes on before its progress is reported.
TimeSpan Threshold { get; }
Property Value
Methods
Attach(IServerWorkDoneManager)
Attaches the reporter to the server whose client it reports to: until it is, nothing is reported.
void Attach(IServerWorkDoneManager manager)
Parameters
managerIServerWorkDoneManagerThe server's work done manager.
Begin(string)
Begins work the server does of its own - indexing a workspace, say - whose progress it reports to a token it creates
(window/workDoneProgress/create).
IWorkProgress Begin(string title)
Parameters
titlestringWhat the work is, as the client shows it.
Returns
BeginFor(IWorkDoneProgressParams, string)
Begins work done for a request, whose progress is reported to the token the request gave for it; work for a request that gave none is reported nothing.
IWorkProgress BeginFor(IWorkDoneProgressParams request, string title)
Parameters
requestIWorkDoneProgressParamsThe request.
titlestringWhat the work is, as the client shows it.