Method ScanAsync
- Namespace
- IntentSharp.Documents
- Assembly
- IntentSharp.dll
ScanAsync(CancellationToken)
Reads the working folder now: imports new files, hands edited working copies to the document coordinator, and replaces Problems. A watching store does this by itself once the folder is quiet after a change; call it when watching is off. It also takes in what other store instances wrote to the state, and rewrites working copies an earlier rewrite failed to update.
public Task ScanAsync(CancellationToken ct = default)
Parameters
ctCancellationTokenCancels the read.
Returns
- Task
Remarks
A working copy that cannot be read or taken in, or for which the lock file stays held, is reported in Problems rather than thrown. A change callback that throws reaches the caller as an AggregateException once every token has fired: the read and the changes it made were stored, and a callback failed.
Exceptions
- ObjectDisposedException
The store is disposed.
- AggregateException
A change callback threw after the changes were stored (see the remarks).
- IOException
The working folder exists but could not be listed.
- InvalidOperationException
A document validator called it while this store was checking an edit (see the class remarks).