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
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'seventtime, else itsce-time, else now -- whatever theclocktype;ce-time=eventtime;walltime= now;clocktypedefaults towall.
public static CloudEvent Stamp(CloudEvent output, CloudEvent input)
Parameters
outputCloudEventinputCloudEvent
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
outputCloudEventinputCloudEventeventTimeDateTimeOffset?
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
outputCloudEventeventTimeDateTimeOffset?
Returns
- CloudEvent
output, for chaining.