Interface IMutableDatasetCatalog
The write side of an IDatasetCatalog: a catalog whose contents
a mutating host can change in-process. Backs the open_dataset,
close_dataset, and close_all_datasets tools.
public interface IMutableDatasetCatalog : IDatasetCatalog
- Inherited Members
Remarks
It is an IDatasetCatalog, so a single instance feeds both the read-only query tools and the mutating tools — one authoritative view of "what is loaded now". Every mutation publishes Changed exactly as the read tools expect, so a query issued right after a load observes the new dataset without any extra synchronization.
This replaces the desktop viewer's UI-thread-coupled IDatasetLoadGateway
with a renderer- and framework-neutral seam: the headless CLI session
implements it over its Skia pipeline; the viewer implements it over its
Mapsui load path. Load timing / measurement is the tool's concern, not the
catalog's.
Methods
LoadAsync(string, string?, CancellationToken)
Loads a dataset file or exchange set (folder / archive) and adds every dataset the host can portray to the catalog. The path kind (single file vs. exchange set) is auto-detected.
Task<DatasetLoadOutcome> LoadAsync(string path, string? specHint = null, CancellationToken cancellationToken = default)
Parameters
pathstringA local filesystem path that already exists.
specHintstringOptional product-spec hint (e.g.
"S-102") for single-file loads whose product cannot be inferred; ignored for exchange sets.cancellationTokenCancellationTokenCancels the load.
Returns
- Task<DatasetLoadOutcome>
The outcome, including the ids added. An empty Added means the path was recognised but produced nothing portrayable — the calling tool maps that to DatasetLoadFailed.
Remove(DatasetId)
Removes one dataset by id.
bool Remove(DatasetId id)
Parameters
idDatasetIdThe dataset to remove.
Returns
RemoveAll()
Removes every dataset currently loaded.
int RemoveAll()
Returns
- int
The number of datasets removed.