Table of Contents

Interface IMutableDatasetCatalog

Namespace
EncDotNet.S100.Datasets.Pipelines.Catalog
Assembly
EncDotNet.S100.Datasets.Pipelines.dll

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

path string

A local filesystem path that already exists.

specHint string

Optional product-spec hint (e.g. "S-102") for single-file loads whose product cannot be inferred; ignored for exchange sets.

cancellationToken CancellationToken

Cancels 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

id DatasetId

The dataset to remove.

Returns

bool

true when a dataset was removed; otherwise false.

RemoveAll()

Removes every dataset currently loaded.

int RemoveAll()

Returns

int

The number of datasets removed.