BeginEdit() Method

Definition

Assembly Broadside.Viewer.dll

Starts an edit of Document on the calling thread (the UI thread): in Background mode it stops the reads that workers have in progress (page loads, display-list builds and page-model loads, which start again after the edit) and holds new ones until the returned scope is disposed. Edit the document only inside such a scope while the session reads it; AnnotationLayer's edits take one themselves.

public IDisposable BeginEdit()

Returns

IDisposable
The edit's scope; dispose it when the edit is done (then invalidate the tiles it touched).

Remarks

Spec #33 viewer capability 1 (#357): the thread-safety contract, concurrent reads and renders, single-threaded mutation. Tile replays read only the finished display list and go on. In Cooperative mode every read runs on the caller's thread, so the scope does nothing.