Table of Contents

Struct EventLevel

Namespace
DatabentoDotNet.Reference
Assembly
DatabentoDotNet.Reference.dll

The level a corporate-action event applies at.

[JsonConverter(typeof(ReferenceCodeJsonConverter<EventLevel>))]
public readonly record struct EventLevel : IReferenceCode<EventLevel>, IEquatable<EventLevel>
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:2301) 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.

Constructors

EventLevel(string)

Wraps a wire code, known or not. Prefer a named member such as Country where one exists, and From(string?) where the value came from the server.

public EventLevel(string code)

Parameters

code string

The wire code.

Exceptions

ArgumentException

code is 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

string

Country

country (country).

public static EventLevel Country { get; }

Property Value

EventLevel

HasValue

true when this names a code — known or not.

public bool HasValue { get; }

Property Value

bool

IsKnown

true when Code is one of KnownCodes.

public bool IsKnown { get; }

Property Value

bool

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.

Issuer

issuer (issuer).

public static EventLevel Issuer { get; }

Property Value

EventLevel

KnownCodes

Every code the reference API reported for this type when the fixture was captured — 4 of them.

public static IReadOnlySet<string> KnownCodes { get; }

Property Value

IReadOnlySet<string>

Listing

listing (listing).

public static EventLevel Listing { get; }

Property Value

EventLevel

Security

security (security).

public static EventLevel Security { get; }

Property Value

EventLevel

Methods

From(string?)

Reads a wire code, mapping null and the empty string to default — the absence of a value.

public static EventLevel From(string? code)

Parameters

code string

The wire code, or null.

Returns

EventLevel

The value.

ToString()

The wire code, or the empty string when this names no value.

public override string ToString()

Returns

string

The wire code.