Table of Contents

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

Constructors

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

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

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.

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.

Operators

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