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

original EventAndContext

EventAndContext(object, EventContext)

Represents an event and its context.

public EventAndContext(object Event, EventContext Context)

Parameters

Event object

The content of the vent.

Context EventContext

EventContext for the event.

Properties

Context

EventContext for the event.

public EventContext Context { get; init; }

Property Value

EventContext

EqualityContract

protected virtual Type EqualityContract { get; }

Property Value

Type

Event

The content of the vent.

public object Event { get; init; }

Property Value

object

Methods

Deconstruct(out object, out EventContext)

public void Deconstruct(out object Event, out EventContext Context)

Parameters

Event object
Context EventContext

Equals(EventAndContext?)

public virtual bool Equals(EventAndContext? other)

Parameters

other EventAndContext

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 ==(EventAndContext?, EventAndContext?)

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

Parameters

left EventAndContext
right EventAndContext

Returns

bool

operator !=(EventAndContext?, EventAndContext?)

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

Parameters

left EventAndContext
right EventAndContext

Returns

bool