Table of Contents

Class EncProductCatalogClient

Namespace
EncDotNet.Noaa
Assembly
EncDotNet.Noaa.dll

HTTP client for downloading and deserializing NOAA ENC product catalogs.

public class EncProductCatalogClient : IDisposable
Inheritance
EncProductCatalogClient
Implements
Inherited Members

Constructors

EncProductCatalogClient(HttpClient?)

Initializes a new instance of the EncProductCatalogClient class.

public EncProductCatalogClient(HttpClient? httpClient = null)

Parameters

httpClient HttpClient

An optional HttpClient to use for requests. If null, a new instance is created.

Methods

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public void Dispose()

GetCatalogAsync(string, CancellationToken)

Downloads and deserializes an ENC product catalog from the specified URL.

public Task<EncProductCatalog> GetCatalogAsync(string url, CancellationToken cancellationToken = default)

Parameters

url string

The URL of the catalog XML.

cancellationToken CancellationToken

A token to cancel the operation.

Returns

Task<EncProductCatalog>

The deserialized EncProductCatalog.

GetNoaaCatalogAsync(CancellationToken)

Downloads and deserializes the official NOAA ENC product catalog.

public Task<EncProductCatalog> GetNoaaCatalogAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

A token to cancel the operation.

Returns

Task<EncProductCatalog>

The deserialized EncProductCatalog.