Class AppendOperation

Namespace
Cratis.Chronicle.EventSequences.Operations
Assembly
Cratis.Chronicle.dll

Represents an operation to append an event to an event sequence.

public record AppendOperation : IEventSequenceOperation, IEquatable<AppendOperation>
Inheritance
AppendOperation
Implements
Inherited Members
Extension Methods

Constructors

AppendOperation(AppendOperation)

protected AppendOperation(AppendOperation original)

Parameters

original AppendOperation

AppendOperation(object, Causation?, EventStreamType?, EventStreamId?, EventSourceType?, IEnumerable<string>?, DateTimeOffset?, Subject?)

Represents an operation to append an event to an event sequence.

public AppendOperation(object Event, Causation? Causation = null, EventStreamType? EventStreamType = null, EventStreamId? EventStreamId = null, EventSourceType? EventSourceType = null, IEnumerable<string>? Tags = null, DateTimeOffset? Occurred = null, Subject? Subject = null)

Parameters

Event object

The event to append.

Causation Causation

Optional The causation for the event.

EventStreamType EventStreamType

Optional The type of event stream.

EventStreamId EventStreamId

Optional The identifier for the event stream.

EventSourceType EventSourceType

Optional The type of event source.

Tags IEnumerable<string>

Optional dynamic tags to associate with the event.

Occurred DateTimeOffset?

Optional timestamp for when the event occurred.

Subject Subject

Optional subject identifying what the event is about.

Properties

Causation

Optional The causation for the event.

public Causation? Causation { get; init; }

Property Value

Causation

EqualityContract

protected virtual Type EqualityContract { get; }

Property Value

Type

Event

The event to append.

public object Event { get; init; }

Property Value

object

EventSourceType

Optional The type of event source.

public EventSourceType? EventSourceType { get; init; }

Property Value

EventSourceType

EventStreamId

Optional The identifier for the event stream.

public EventStreamId? EventStreamId { get; init; }

Property Value

EventStreamId

EventStreamType

Optional The type of event stream.

public EventStreamType? EventStreamType { get; init; }

Property Value

EventStreamType

NamedTags

Gets or inits the structured named tags for this event.

public IEnumerable<NamedTag> NamedTags { get; init; }

Property Value

IEnumerable<NamedTag>

Exceptions

InvalidNamedTag

The collection contains a null named tag.

Occurred

Optional timestamp for when the event occurred.

public DateTimeOffset? Occurred { get; init; }

Property Value

DateTimeOffset?

Subject

Optional subject identifying what the event is about.

public Subject? Subject { get; init; }

Property Value

Subject

Tags

Optional dynamic tags to associate with the event.

public IEnumerable<string>? Tags { get; init; }

Property Value

IEnumerable<string>

Methods

Deconstruct(out object, out Causation?, out EventStreamType?, out EventStreamId?, out EventSourceType?, out IEnumerable<string>?, out DateTimeOffset?, out Subject?)

public void Deconstruct(out object Event, out Causation? Causation, out EventStreamType? EventStreamType, out EventStreamId? EventStreamId, out EventSourceType? EventSourceType, out IEnumerable<string>? Tags, out DateTimeOffset? Occurred, out Subject? Subject)

Parameters

Event object
Causation Causation
EventStreamType EventStreamType
EventStreamId EventStreamId
EventSourceType EventSourceType
Tags IEnumerable<string>
Occurred DateTimeOffset?
Subject Subject

Equals(AppendOperation?)

public virtual bool Equals(AppendOperation? other)

Parameters

other AppendOperation

Returns

bool

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

PrintMembers(StringBuilder)

protected virtual bool PrintMembers(StringBuilder builder)

Parameters

builder StringBuilder

Returns

bool

ToString()

public override string ToString()

Returns

string

Operators

operator ==(AppendOperation?, AppendOperation?)

public static bool operator ==(AppendOperation? left, AppendOperation? right)

Parameters

left AppendOperation
right AppendOperation

Returns

bool

operator !=(AppendOperation?, AppendOperation?)

public static bool operator !=(AppendOperation? left, AppendOperation? right)

Parameters

left AppendOperation
right AppendOperation

Returns

bool