Table of Contents

Struct EventEnvelope

Namespace
Virtufin.Base.Events
Assembly
Virtufin.Base.dll

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

scenarioId string
scenarioName string
marketLane Lane
marketSelector string
portfolioLane Lane?
strategyLane Lane?
clockType ClockType
eventTime DateTimeOffset
wallTime DateTimeOffset
correlationId Guid
runId Guid

Properties

ClockType

Clock interpretation for EventTime.

public ClockType ClockType { get; init; }

Property Value

ClockType

CorrelationId

UUID tying the event back to its originating action.

public Guid CorrelationId { get; init; }

Property Value

Guid

Empty

An empty envelope with all fields zeroed — useful for tests and market events.

public static EventEnvelope Empty { get; }

Property Value

EventEnvelope

EventTime

Time at which the business-domain fact occurred.

public DateTimeOffset EventTime { get; init; }

Property Value

DateTimeOffset

MarketLane

Market component lane (act or hyp).

public Lane MarketLane { get; init; }

Property Value

Lane

MarketSelector

Market selector; null when MarketLane is act.

public string? MarketSelector { get; init; }

Property Value

string

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

Guid

ScenarioId

Opaque scenario id; absent on market events.

public string? ScenarioId { get; init; }

Property Value

string

ScenarioName

Human-readable scenario name (e.g. BACKTEST_BTC_2021); absent on market events.

public string? ScenarioName { get; init; }

Property Value

string

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

DateTimeOffset

Methods

Equals(IEventEnvelope?)

Indicates whether the current object is equal to another object of the same type.

public bool Equals(IEventEnvelope? other)

Parameters

other IEventEnvelope

An object to compare with this object.

Returns

bool

true if the current object is equal to the other parameter; otherwise, false.