Table of Contents

Class Envelope

Namespace
Virtufin.Worker.DevKit
Assembly
Virtufin.Worker.DevKit.dll

The common envelope of a derived event (openspec pubsub-topics, Common Envelope Extensions, "Envelope on a derived event").

public static class Envelope
Inheritance
Envelope
Inherited Members

Fields

DefaultClockType

The clocktype an output gets when its input carries none.

public const string DefaultClockType = "wall"

Field Value

string

Methods

Stamp(CloudEvent, CloudEvent)

Stamp output, derived from input:

  • the input's carried extensions (correlationid, scenarioid, runid, exchange, clocktype, the world and universe legs);
  • eventtime = the input's eventtime, else its ce-time, else now -- whatever the clocktype; ce-time = eventtime;
  • walltime = now; clocktype defaults to wall.
public static CloudEvent Stamp(CloudEvent output, CloudEvent input)

Parameters

output CloudEvent
input CloudEvent

Returns

CloudEvent

output, for chaining.

Stamp(CloudEvent, CloudEvent, DateTimeOffset?)

Stamp(CloudEvent, CloudEvent), with the output's own eventTime when the worker knows it (e.g. the exchange's close time of a candle it built); null inherits it from the input.

public static CloudEvent Stamp(CloudEvent output, CloudEvent input, DateTimeOffset? eventTime)

Parameters

output CloudEvent
input CloudEvent
eventTime DateTimeOffset?

Returns

CloudEvent

output, for chaining.

StampTimes(CloudEvent, DateTimeOffset?)

The time legs of the envelope: ce-time = eventtime = eventTime (now when null) and walltime = now. Shared by every envelope a devkit stamps, so the three times are always set together.

public static CloudEvent StampTimes(CloudEvent output, DateTimeOffset? eventTime)

Parameters

output CloudEvent
eventTime DateTimeOffset?

Returns

CloudEvent

output, for chaining.