Struct EventEnvelope
Concrete IEventEnvelope implementation.
public readonly record struct EventEnvelope : IEventEnvelope, IEquatable<IEventEnvelope>, IEquatable<EventEnvelope>
- Implements
- Inherited Members
- Extension Methods
Constructors
EventEnvelope(string?, string?, Lane, string?, Lane?, Lane?, ClockType, DateTimeOffset, DateTimeOffset, Guid, Guid)
Construct an envelope.
public EventEnvelope(string? scenarioId, string? scenarioName, Lane marketLane, string? marketSelector, Lane? portfolioLane, Lane? strategyLane, ClockType clockType, DateTimeOffset eventTime, DateTimeOffset wallTime, Guid correlationId, Guid runId)
Parameters
scenarioIdstringscenarioNamestringmarketLaneLanemarketSelectorstringportfolioLaneLane?strategyLaneLane?clockTypeClockTypeeventTimeDateTimeOffsetwallTimeDateTimeOffsetcorrelationIdGuidrunIdGuid
Properties
ClockType
Clock interpretation for EventTime.
public ClockType ClockType { get; init; }
Property Value
CorrelationId
UUID tying the event back to its originating action.
public Guid CorrelationId { get; init; }
Property Value
Empty
An empty envelope with all fields zeroed — useful for tests and market events.
public static EventEnvelope Empty { get; }
Property Value
EventTime
Time at which the business-domain fact occurred.
public DateTimeOffset EventTime { get; init; }
Property Value
MarketLane
Market component lane (act or hyp).
public Lane MarketLane { get; init; }
Property Value
MarketSelector
Market selector; null when MarketLane is act.
public string? MarketSelector { get; init; }
Property Value
PortfolioLane
Portfolio lane (act or hyp); absent on market events.
public Lane? PortfolioLane { get; init; }
Property Value
- Lane?
RunId
UUID disambiguating concurrent runs of the same scenario.
public Guid RunId { get; init; }
Property Value
ScenarioId
Opaque scenario id; absent on market events.
public string? ScenarioId { get; init; }
Property Value
ScenarioName
Human-readable scenario name (e.g. BACKTEST_BTC_2021); absent on market events.
public string? ScenarioName { get; init; }
Property Value
StrategyLane
Strategy lane (act or hyp); absent on market events.
public Lane? StrategyLane { get; init; }
Property Value
- Lane?
WallTime
Real wall-clock time the event was processed/observed.
public DateTimeOffset WallTime { get; init; }
Property Value
Methods
Equals(IEventEnvelope?)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(IEventEnvelope? other)
Parameters
otherIEventEnvelopeAn object to compare with this object.