Table of Contents

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

locations IReadOnlyList<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

group LibraryOpenGroup

The items of one exchange set or folder.

defer bool

True to load as the items come into view.

cancellationToken CancellationToken

Cancels the open.

Returns

Task<LibraryOpenOutcome>

StateOf(LocalItemLocation)

The session state of the dataset at location.

LibraryLoadState StateOf(LocalItemLocation location)

Parameters

location LocalItemLocation

A local item location.

Returns

LibraryLoadState

Events

Changed

Raised when an opened item's state changes (loaded, deferred, closed).

event EventHandler? Changed

Event Type

EventHandler