Class EventAndContext
- Namespace
- Cratis.Chronicle.Events
- Assembly
- Cratis.Chronicle.dll
Represents an event and its context.
public record EventAndContext : IEquatable<EventAndContext>
- Inheritance
-
EventAndContext
- Implements
- Inherited Members
- Extension Methods
Constructors
EventAndContext(EventAndContext)
protected EventAndContext(EventAndContext original)
Parameters
originalEventAndContext
EventAndContext(object, EventContext)
Represents an event and its context.
public EventAndContext(object Event, EventContext Context)
Parameters
EventobjectThe content of the vent.
ContextEventContextEventContext for the event.
Properties
Context
EventContext for the event.
public EventContext Context { get; init; }
Property Value
EqualityContract
protected virtual Type EqualityContract { get; }
Property Value
Event
The content of the vent.
public object Event { get; init; }
Property Value
Methods
Deconstruct(out object, out EventContext)
public void Deconstruct(out object Event, out EventContext Context)
Parameters
EventobjectContextEventContext
Equals(EventAndContext?)
public virtual bool Equals(EventAndContext? other)
Parameters
otherEventAndContext
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 ==(EventAndContext?, EventAndContext?)
public static bool operator ==(EventAndContext? left, EventAndContext? right)
Parameters
leftEventAndContextrightEventAndContext
Returns
operator !=(EventAndContext?, EventAndContext?)
public static bool operator !=(EventAndContext? left, EventAndContext? right)
Parameters
leftEventAndContextrightEventAndContext