Struct MappingInterval
- Namespace
- DatabentoDotNet.Dbn
- Assembly
- DatabentoDotNet.Dbn.dll
The symbol a raw symbol resolved to over one half-open date range.
public readonly record struct MappingInterval : IEquatable<MappingInterval>
- Implements
- Inherited Members
Remarks
The range is half-open: StartDate is inclusive and
EndDate is exclusive. Symbol-map lookups depend on that convention, so a
date equal to EndDate belongs to the next interval, not this one.
A readonly record struct rather than a class: it carries one reference and two 4-byte
dates, a definition file can hold dozens of intervals per mapping, and value equality is what
a caller comparing two intervals actually means. Upstream is a plain struct with
PartialEq, which is the same thing.
The dates are NodaTime LocalDate, per CLAUDE.md — a calendar date with no zone,
which is exactly what the wire carries here: a u32 holding the decimal digits
YYYYMMDD, with no time and no offset anywhere in it. Note this is the one date in DBN
metadata that is not a nanosecond timestamp; Start and
End are the other kind.
Constructors
MappingInterval(LocalDate, LocalDate, string)
The symbol a raw symbol resolved to over one half-open date range.
public MappingInterval(LocalDate StartDate, LocalDate EndDate, string Symbol)
Parameters
StartDateLocalDateThe UTC start of the interval, inclusive.
EndDateLocalDateThe UTC end of the interval, exclusive.
SymbolstringThe resolved symbol for this interval, in the stream's output symbology.
Remarks
The range is half-open: StartDate is inclusive and
EndDate is exclusive. Symbol-map lookups depend on that convention, so a
date equal to EndDate belongs to the next interval, not this one.
A readonly record struct rather than a class: it carries one reference and two 4-byte
dates, a definition file can hold dozens of intervals per mapping, and value equality is what
a caller comparing two intervals actually means. Upstream is a plain struct with
PartialEq, which is the same thing.
The dates are NodaTime LocalDate, per CLAUDE.md — a calendar date with no zone,
which is exactly what the wire carries here: a u32 holding the decimal digits
YYYYMMDD, with no time and no offset anywhere in it. Note this is the one date in DBN
metadata that is not a nanosecond timestamp; Start and
End are the other kind.
Properties
EndDate
The UTC end of the interval, exclusive.
public LocalDate EndDate { get; init; }
Property Value
StartDate
The UTC start of the interval, inclusive.
public LocalDate StartDate { get; init; }
Property Value
Symbol
The resolved symbol for this interval, in the stream's output symbology.
public string Symbol { get; init; }