Class EventForEventSourceId
- Namespace
- Cratis.Chronicle.EventSequences
- Assembly
- Cratis.Chronicle.dll
Represents an event and the EventSourceId it is for.
public record EventForEventSourceId : IEquatable<EventForEventSourceId>
- Inheritance
-
EventForEventSourceId
- Implements
- Inherited Members
- Extension Methods
Constructors
EventForEventSourceId(EventForEventSourceId)
protected EventForEventSourceId(EventForEventSourceId original)
Parameters
originalEventForEventSourceId
EventForEventSourceId(EventSourceId, object, Causation?)
Represents an event and the EventSourceId it is for.
public EventForEventSourceId(EventSourceId EventSourceId, object Event, Causation? Causation = null)
Parameters
EventSourceIdEventSourceIdEventSourceId the event is for.
EventobjectThe actual event.
CausationCausationOptional causation for the event. If not set, the current causation chain is used.
Properties
Causation
Optional causation for the event. If not set, the current causation chain is used.
public Causation? Causation { get; init; }
Property Value
DeclaredConcurrency
Gets or inits concurrency dimensions to resolve individually at an Enforce commit.
public ConcurrencyDimensions? DeclaredConcurrency { get; init; }
Property Value
EqualityContract
protected virtual Type EqualityContract { get; }
Property Value
Event
The actual event.
public object Event { get; init; }
Property Value
EventSource
Gets or inits the type of the IEventSource the event is appended through. When set, the EventSourceType and EventStreamType are taken from the definition, and explicit values that contradict it are rejected.
public Type? EventSource { get; init; }
Property Value
EventSourceId
EventSourceId the event is for.
public EventSourceId EventSourceId { get; init; }
Property Value
EventSourceType
Gets or inits the EventSourceType for the event. Defaults to Default.
public EventSourceType EventSourceType { get; init; }
Property Value
EventStream
Gets or inits the name of the stream declared by EventSource the event is appended to.
public string? EventStream { get; init; }
Property Value
EventStreamId
Gets or inits the EventStreamId for the event. Defaults to Default.
public EventStreamId EventStreamId { get; init; }
Property Value
EventStreamType
Gets or inits the EventStreamType for the event. Defaults to All.
public EventStreamType EventStreamType { get; init; }
Property Value
IdempotencyKey
Gets or inits the optional IdempotencyKey that makes appending this event idempotent. A batch in which any event has a key is appended once; events without a key are appended normally.
public IdempotencyKey? IdempotencyKey { get; init; }
Property Value
NamedTags
Gets or inits the structured named tags for this event.
public IEnumerable<NamedTag> NamedTags { get; init; }
Property Value
Exceptions
- InvalidNamedTag
The collection contains a null named tag.
Occurred
Gets or inits the optional occurred time. If not set, the server will set it to approximately the time of append.
public DateTimeOffset? Occurred { get; init; }
Property Value
Subject
Gets or inits the optional Subject for the event. When omitted, Chronicle derives it from a SubjectAttribute on the event, or falls back to EventSourceId.
public Subject? Subject { get; init; }
Property Value
Tags
Gets or inits the tags to associate with the event. These are combined with any static tags declared on the event type and any tags supplied at append time.
public IEnumerable<string> Tags { get; init; }
Property Value
Methods
Deconstruct(out EventSourceId, out object, out Causation?)
public void Deconstruct(out EventSourceId EventSourceId, out object Event, out Causation? Causation)
Parameters
EventSourceIdEventSourceIdEventobjectCausationCausation
Equals(EventForEventSourceId?)
public virtual bool Equals(EventForEventSourceId? other)
Parameters
otherEventForEventSourceId
Returns
Equals(object?)
public override bool Equals(object? obj)
Parameters
objobject
Returns
GetHashCode()
public override int GetHashCode()
Returns
PrintMembers(StringBuilder)
protected virtual bool PrintMembers(StringBuilder builder)
Parameters
builderStringBuilder
Returns
ToString()
public override string ToString()
Returns
Operators
operator ==(EventForEventSourceId?, EventForEventSourceId?)
public static bool operator ==(EventForEventSourceId? left, EventForEventSourceId? right)
Parameters
leftEventForEventSourceIdrightEventForEventSourceId
Returns
operator !=(EventForEventSourceId?, EventForEventSourceId?)
public static bool operator !=(EventForEventSourceId? left, EventForEventSourceId? right)
Parameters
leftEventForEventSourceIdrightEventForEventSourceId