Struct FieldGroup
- Namespace
- DatabentoDotNet.Reference
- Assembly
- DatabentoDotNet.Reference.dll
Which of a corporate action's three open field maps a field belongs to.
[JsonConverter(typeof(ReferenceCodeJsonConverter<FieldGroup>))]
public readonly record struct FieldGroup : IReferenceCode<FieldGroup>, IEquatable<FieldGroup>
- Implements
- Inherited Members
Remarks
An open set: a code this library does not know is carried, not lost. Upstream ends
this enum in an Unknown(String) variant (enums.rs:2681) so a code Databento adds
next month round-trips untouched, and a C# enum cannot hold a payload. See
IReferenceCode<TSelf> for the shape this takes instead and why.
corporate_actions.list_enums has no group for this type, so corporate_actions.list_events is its only authority — and the two agree exactly, upstream included.
Names event_info, date_info and rate_info — the three maps CorporateAction carries (corporate.rs:433-438). Load-bearing for the list_events documentation as well as for a response field.
Constructors
FieldGroup(string)
Wraps a wire code, known or not. Prefer a named member such as DateInfo where one exists, and From(string?) where the value came from the server.
public FieldGroup(string code)
Parameters
codestringThe wire code.
Exceptions
- ArgumentException
codeis null or empty. A blank code is the absence of a value, which is default.
Properties
Code
The wire code, or null when this names no value.
public string? Code { get; }
Property Value
DateInfo
date_info (date_info).
public static FieldGroup DateInfo { get; }
Property Value
EventInfo
event_info (event_info).
public static FieldGroup EventInfo { get; }
Property Value
HasValue
true when this names a code — known or not.
public bool HasValue { get; }
Property Value
IsKnown
true when Code is one of KnownCodes.
public bool IsKnown { get; }
Property Value
Remarks
false is not an error. It means the server sent something newer than the table this library shipped with, and the code is still in Code to be read, logged, or sent back in a filter.
KnownCodes
Every code the reference API reported for this type when the fixture was captured — 3 of them.
public static IReadOnlySet<string> KnownCodes { get; }
Property Value
RateInfo
rate_info (rate_info).
public static FieldGroup RateInfo { get; }
Property Value
Methods
From(string?)
public static FieldGroup From(string? code)
Parameters
Returns
- FieldGroup
The value.
ToString()
The wire code, or the empty string when this names no value.
public override string ToString()
Returns
- string
The wire code.