Class NoaaEncScope
- Namespace
- EncDotNet.S100.Collections.Library
- Assembly
- EncDotNet.S100.Collections.dll
A scope of the NOAA ENC product catalogue: by state, Coast Guard district or region.
public sealed class NoaaEncScope : LibraryCatalogueScope
- Inheritance
-
NoaaEncScope
- Inherited Members
Constructors
NoaaEncScope(Uri, Func<Uri, CancellationToken, Task<NoaaEncProductCatalog>>)
Creates a scope of the NOAA catalogue at catalogUri.
public NoaaEncScope(Uri catalogUri, Func<Uri, CancellationToken, Task<NoaaEncProductCatalog>> load)
Parameters
catalogUriUriThe catalogue's URL.
loadFunc<Uri, CancellationToken, Task<NoaaEncProductCatalog>>Reads the catalogue.
Properties
CoastGuardDistricts
The Coast Guard districts in the catalogue.
public IReadOnlyList<LibraryChoice> CoastGuardDistricts { get; }
Property Value
CurrentFilter
The filter for the ticked choices.
public NoaaEncFilter CurrentFilter { get; }
Property Value
EverythingSummary
"12,345 cells · 1.2 GB" for the whole catalogue.
public override string EverythingSummary { get; }
Property Value
Groups
The choice groups, once the catalogue has been read.
public override IReadOnlyList<LibraryChoiceGroup> Groups { get; }
Property Value
IsLoaded
True once the catalogue has been read.
public override bool IsLoaded { get; }
Property Value
Regions
The regions in the catalogue.
public IReadOnlyList<LibraryChoice> Regions { get; }
Property Value
SelectionSummary
What the ticked choices (or, with none, the whole catalogue) amount to, e.g. "12 cells · 3 MB".
public override string SelectionSummary { get; }
Property Value
SingleEntry
The catalogue's only download, when it lists just one (there is nothing to choose); otherwise null.
public override LibraryChoice? SingleEntry { get; }
Property Value
States
The states in the catalogue.
public IReadOnlyList<LibraryChoice> States { get; }
Property Value
Methods
Build(Guid, string?)
The source the scope describes.
public override CollectionSource Build(Guid id, string? name)
Parameters
idGuidThe new source's id.
namestringThe source's name when everything is included (the catalogue's name); a selection names it after the selection. A manifest source always takes it.
Returns
DescribeSelection()
Describes the ticked choices ("Alaska, Hawaii"), or null when nothing is ticked.
public override string? DescribeSelection()
Returns
LoadAsync(CancellationToken)
Reads the catalogue and creates its choices.
public override Task<string?> LoadAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationTokenCancels the read.