Class EventSourceId

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

Represents the unique identifier of an instance of an event source.

public record EventSourceId : ConceptAs<string>, IComparable<ConceptAs<string>>, IComparable<string>, IComparable, IEquatable<ConceptAs<string>>, IEquatable<EventSourceId>
Inheritance
EventSourceId
Implements
Inherited Members
Extension Methods

Constructors

EventSourceId(EventSourceId)

protected EventSourceId(EventSourceId original)

Parameters

original EventSourceId

EventSourceId(Guid)

Initializes a new instance of the EventSourceId class.

public EventSourceId(Guid value)

Parameters

value Guid

The Guid value.

EventSourceId(string)

Represents the unique identifier of an instance of an event source.

public EventSourceId(string Value)

Parameters

Value string

Actual value.

Fields

Unspecified

Gets the representation of an unspecified EventSourceId.

public static readonly EventSourceId Unspecified

Field Value

EventSourceId

Properties

EqualityContract

protected override Type EqualityContract { get; }

Property Value

Type

IsSpecified

Check whether or not the EventSourceId is specified.

public bool IsSpecified { get; }

Property Value

bool

Methods

Deconstruct(out string)

public void Deconstruct(out string Value)

Parameters

Value string

Equals(EventSourceId?)

public virtual bool Equals(EventSourceId? other)

Parameters

other EventSourceId

Returns

bool

Equals(ConceptAs<string>?)

public override sealed bool Equals(ConceptAs<string>? other)

Parameters

other ConceptAs<string>

Returns

bool

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

New()

Create a new EventSourceId.

public static EventSourceId New()

Returns

EventSourceId

A new EventSourceId.

PrintMembers(StringBuilder)

protected override bool PrintMembers(StringBuilder builder)

Parameters

builder StringBuilder

Returns

bool

Operators

operator ==(EventSourceId?, EventSourceId?)

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

Parameters

left EventSourceId
right EventSourceId

Returns

bool

implicit operator EventSourceId(Guid)

Implicitly convert from Guid to EventSourceId.

public static implicit operator EventSourceId(Guid id)

Parameters

id Guid

Guid to convert from.

Returns

EventSourceId

A converted EventSourceId.

implicit operator EventSourceId(string)

Implicitly convert from string to EventSourceId.

public static implicit operator EventSourceId(string id)

Parameters

id string

string to convert from.

Returns

EventSourceId

A converted EventSourceId.

operator !=(EventSourceId?, EventSourceId?)

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

Parameters

left EventSourceId
right EventSourceId

Returns

bool