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
originalEventType
EventType(EventTypeId, EventTypeGeneration, bool)
Represents the type of an event.
public EventType(EventTypeId Id, EventTypeGeneration Generation, bool Tombstone = false)
Parameters
IdEventTypeIdGenerationEventTypeGenerationGeneration of the event.
TombstoneboolWhether or not the event is a tombstone event.
Fields
Unknown
Represents an unknown event type.
public static readonly EventType Unknown
Field Value
Properties
EqualityContract
protected virtual Type EqualityContract { get; }
Property Value
Generation
Generation of the event.
public EventTypeGeneration Generation { get; init; }
Property Value
Id
public EventTypeId Id { get; init; }
Property Value
Tombstone
Whether or not the event is a tombstone event.
public bool Tombstone { get; init; }
Property Value
Methods
Deconstruct(out EventTypeId, out EventTypeGeneration, out bool)
public void Deconstruct(out EventTypeId Id, out EventTypeGeneration Generation, out bool Tombstone)
Parameters
IdEventTypeIdGenerationEventTypeGenerationTombstonebool
Equals(EventType?)
public virtual bool Equals(EventType? other)
Parameters
otherEventType
Returns
Equals(object?)
public override bool Equals(object? obj)
Parameters
objobject
Returns
GetHashCode()
public override int GetHashCode()
Returns
Parse(string)
Parse from a string representation of event type to actual type.
public static EventType Parse(string input)
Parameters
inputstringString representation.
Returns
Remarks
The expected format is guid+generation. Ex: aa7faa25-afc1-48d1-8558-716581c0e916+1.
PrintMembers(StringBuilder)
protected virtual bool PrintMembers(StringBuilder builder)
Parameters
builderStringBuilder
Returns
ToString()
public override string ToString()
Returns
Operators
operator ==(EventType?, EventType?)
public static bool operator ==(EventType? left, EventType? right)
Parameters
Returns
implicit operator string(EventType)
Implicitly convert from EventType to string.
public static implicit operator string(EventType type)
Parameters
typeEventTypeEventType to convert from.
Returns
implicit operator EventType(string)
Implicitly convert from string to EventType.
public static implicit operator EventType(string value)
Parameters
valuestringString representation.
Returns
operator !=(EventType?, EventType?)
public static bool operator !=(EventType? left, EventType? right)