Interface ILibraryDatasetOpener
- Namespace
- EncDotNet.S100.Collections.Library
- Assembly
- EncDotNet.S100.Collections.dll
The host seam LibraryLoader opens datasets through: the viewer registers a group with its exchange-set service (one Datasets-panel header, optional load-as-you-pan); a headless host loads each item into its dataset catalog. The opener also remembers what each item became, so the Library can show it as loaded.
public interface ILibraryDatasetOpener
Methods
Close(IReadOnlyList<LocalItemLocation>)
Closes the datasets opened (or registered to load as you pan) for
locations, releasing their files; locations that
aren't open are ignored. The Library closes a downloaded copy this way
before a download replaces it, since an open file can't be moved or
deleted on Windows.
int Close(IReadOnlyList<LocalItemLocation> locations)
Parameters
locationsIReadOnlyList<LocalItemLocation>Local item locations.
Returns
- int
How many datasets were closed.
OpenAsync(LibraryOpenGroup, bool, CancellationToken)
Opens group's items: loads them now or, with
defer (where the host supports it), registers them to
load as they come into view. Reports per-item problems in the outcome;
throws IOException, UnauthorizedAccessException
or InvalidDataException when the whole group cannot be read.
Task<LibraryOpenOutcome> OpenAsync(LibraryOpenGroup group, bool defer, CancellationToken cancellationToken)
Parameters
groupLibraryOpenGroupThe items of one exchange set or folder.
deferboolTrue to load as the items come into view.
cancellationTokenCancellationTokenCancels the open.
Returns
StateOf(LocalItemLocation)
The session state of the dataset at location.
LibraryLoadState StateOf(LocalItemLocation location)
Parameters
locationLocalItemLocationA local item location.
Returns
Events
Changed
Raised when an opened item's state changes (loaded, deferred, closed).
event EventHandler? Changed