You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
katherinejensen00 edited this page Jul 2, 2021
·
4 revisions
The Plugin API provides a write lock to coordinate changes being made by the plugin with changes made by Paratext.
The typical sequence is:
Plugin gets the data from Paratext
Plugin gets the write lock for the data it intends to modify
Plugin modifies the data
Plugin writes the data to Paratext
Plugin releases the write lock
The plugin uses the RequestWriteLock method to obtain a lock.
It uses the Dispose method of the IWriteLock class to release it.
One of the parameters of the RequestWriteLock is named releaseRequested method and is an Action.
The plugin provides this action, which is called when Paratext would like to lock the data the plugin has locked.
This allows the plugin to perform any steps necessary before releasing the lock.
The plugin must release the lock when requested (or Paratext will release it for the plugin).
The plugin will get a chance to finish the releaseRequested action before Paratext steals the lock.