Class FacetValue

Namespace
Cratis.Chronicle.Concepts.Patterns
Assembly
Cratis.Chronicle.dll

Represents the value a facet holds for a single event or pattern.

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

Constructors

FacetValue(FacetValue)

protected FacetValue(FacetValue original)

Parameters

original FacetValue

FacetValue(string)

Represents the value a facet holds for a single event or pattern.

public FacetValue(string Value)

Parameters

Value string

The actual value.

Fields

Unspecified

Represents an unspecified FacetValue.

public static readonly FacetValue Unspecified

Field Value

FacetValue

Remarks

A facet the event carries nothing for is unspecified rather than null - a fact that is absent should never take part in a mined pattern, and a sentinel keeps every consumer from having to null-check its way there.

Properties

EqualityContract

protected override Type EqualityContract { get; }

Property Value

Type

IsSpecified

Gets a value indicating whether the facet holds a value.

public bool IsSpecified { get; }

Property Value

bool

Methods

Deconstruct(out string)

public void Deconstruct(out string Value)

Parameters

Value string

Equals(FacetValue?)

public virtual bool Equals(FacetValue? other)

Parameters

other FacetValue

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

PrintMembers(StringBuilder)

protected override bool PrintMembers(StringBuilder builder)

Parameters

builder StringBuilder

Returns

bool

Operators

operator ==(FacetValue?, FacetValue?)

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

Parameters

left FacetValue
right FacetValue

Returns

bool

implicit operator FacetValue(string?)

Implicitly convert from a string to FacetValue.

public static implicit operator FacetValue(string? value)

Parameters

value string

String to convert from.

Returns

FacetValue

operator !=(FacetValue?, FacetValue?)

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

Parameters

left FacetValue
right FacetValue

Returns

bool