Table of Contents

Class PublisherMappings

Namespace
DatabentoDotNet.Dbn.Publishers
Assembly
DatabentoDotNet.Dbn.dll

Conversions between Publisher and its Venue / Dataset components.

public static class PublisherMappings
Inheritance
PublisherMappings
Inherited Members

Remarks

Mechanically generated from publishers.rs (v0.68.0) by tools/generate-publishers.py, copying upstream's Publisher::venue(), Publisher::dataset(), and Publisher::from_dataset_venue() match tables verbatim. Publisher values ascend 1-145 but are not grouped by Dataset -- venues added to an already-published dataset in a later dbn release are appended at the end of the enum rather than inserted into their dataset's original block, so a Dataset's Publisher values do not form a contiguous run. There is no formula relating a publisher id to its dataset or venue id; every lookup below is table-driven, never derived by arithmetic.

Methods

ToDataset(Publisher)

Returns the Dataset for value.

public static Dataset ToDataset(this Publisher value)

Parameters

value Publisher

Returns

Dataset

Exceptions

ArgumentOutOfRangeException

value is not a defined Publisher.

ToVenue(Publisher)

Returns the Venue for value.

public static Venue ToVenue(this Publisher value)

Parameters

value Publisher

Returns

Venue

Exceptions

ArgumentOutOfRangeException

value is not a defined Publisher.

TryFromDatasetVenue(Dataset, Venue, out Publisher)

Tries to find the Publisher for the given dataset and venue combination.

public static bool TryFromDatasetVenue(Dataset dataset, Venue venue, out Publisher publisher)

Parameters

dataset Dataset
venue Venue
publisher Publisher

Returns

bool

Remarks

Most of the 71 × 52 possible (Venue, Dataset) combinations are not a real publisher and return false; only the 145 pairs upstream defines succeed.