Table of Contents

Class CloudEvent

Namespace
Virtufin.Core.Events
Assembly
Virtufin.Core.dll

Minimal CloudEvents v1.0 representation. Used as the wire format for Dapr pub/sub topics. Conforms to https://github.com/cloudevents/spec/blob/v1.0.2/spec.md.

public sealed record CloudEvent : IEquatable<CloudEvent>
Inheritance
CloudEvent
Implements
Inherited Members
Extension Methods

Remarks

Virtufin envelope fields not present in the standard CloudEvent spec (e.g. EventTime, CorrelationId, lane selectors) are carried as extension attributes.

Properties

Data

CloudEvent data — the event payload (typically serialised JSON).

public object? Data { get; init; }

Property Value

object

DataContentType

CloudEvent datacontenttype — content type of Data.

public string? DataContentType { get; init; }

Property Value

string

DataSchema

CloudEvent dataschema — URI identifying the schema of Data.

public string? DataSchema { get; init; }

Property Value

string

Extensions

Extension attributes (e.g. eventtime, correlationid, scenariomarketselector).

public IReadOnlyDictionary<string, object?> Extensions { get; init; }

Property Value

IReadOnlyDictionary<string, object>

Id

CloudEvent id — unique event identifier.

public required string Id { get; init; }

Property Value

string

Source

CloudEvent source — context producing the event (e.g. virtufin/scenario/S7F3A9B).

public required string Source { get; init; }

Property Value

string

Subject

CloudEvent subject — scenario id.

public string? Subject { get; init; }

Property Value

string

Time

CloudEvent time — wall-clock time the event was produced.

public DateTimeOffset? Time { get; init; }

Property Value

DateTimeOffset?

Type

CloudEvent type — names the event type (e.g. virtufin.trade.fill.received).

public required string Type { get; init; }

Property Value

string