Class EventType

Namespace
Cratis.Chronicle.Events
Assembly
Cratis.Chronicle.dll

Represents the type of an event.

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

Constructors

EventType(EventType)

protected EventType(EventType original)

Parameters

original EventType

EventType(EventTypeId, EventTypeGeneration, bool)

Represents the type of an event.

public EventType(EventTypeId Id, EventTypeGeneration Generation, bool Tombstone = false)

Parameters

Id EventTypeId

Unique identifier.

Generation EventTypeGeneration

Generation of the event.

Tombstone bool

Whether or not the event is a tombstone event.

Fields

Unknown

Represents an unknown event type.

public static readonly EventType Unknown

Field Value

EventType

Properties

EqualityContract

protected virtual Type EqualityContract { get; }

Property Value

Type

Generation

Generation of the event.

public EventTypeGeneration Generation { get; init; }

Property Value

EventTypeGeneration

Id

public EventTypeId Id { get; init; }

Property Value

EventTypeId

Tombstone

Whether or not the event is a tombstone event.

public bool Tombstone { get; init; }

Property Value

bool

Methods

Deconstruct(out EventTypeId, out EventTypeGeneration, out bool)

public void Deconstruct(out EventTypeId Id, out EventTypeGeneration Generation, out bool Tombstone)

Parameters

Id EventTypeId
Generation EventTypeGeneration
Tombstone bool

Equals(EventType?)

public virtual bool Equals(EventType? other)

Parameters

other EventType

Returns

bool

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

Parse(string)

Parse from a string representation of event type to actual type.

public static EventType Parse(string input)

Parameters

input string

String representation.

Returns

EventType

Parsed EventType.

Remarks

The expected format is guid+generation. Ex: aa7faa25-afc1-48d1-8558-716581c0e916+1.

PrintMembers(StringBuilder)

protected virtual bool PrintMembers(StringBuilder builder)

Parameters

builder StringBuilder

Returns

bool

ToString()

public override string ToString()

Returns

string

Operators

operator ==(EventType?, EventType?)

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

Parameters

left EventType
right EventType

Returns

bool

implicit operator string(EventType)

Implicitly convert from EventType to string.

public static implicit operator string(EventType type)

Parameters

type EventType

EventType to convert from.

Returns

string

implicit operator EventType(string)

Implicitly convert from string to EventType.

public static implicit operator EventType(string value)

Parameters

value string

String representation.

Returns

EventType

operator !=(EventType?, EventType?)

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

Parameters

left EventType
right EventType

Returns

bool