Class FacetSetKey

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

Represents the canonical, stable identity of a FacetSet.

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

Remarks

The key is what a mined pattern is counted, stored and looked up by, so it has to mean the same thing on every silo and across restarts. It is built by FacetSet from ordered, escaped facets rather than from a hash - two sets are the same pattern exactly when they read the same, and the key stays legible in storage.

Constructors

FacetSetKey(FacetSetKey)

protected FacetSetKey(FacetSetKey original)

Parameters

original FacetSetKey

FacetSetKey(string)

Represents the canonical, stable identity of a FacetSet.

public FacetSetKey(string Value)

Parameters

Value string

The actual value.

Remarks

The key is what a mined pattern is counted, stored and looked up by, so it has to mean the same thing on every silo and across restarts. It is built by FacetSet from ordered, escaped facets rather than from a hash - two sets are the same pattern exactly when they read the same, and the key stays legible in storage.

Fields

Empty

Represents the key of the empty FacetSet.

public static readonly FacetSetKey Empty

Field Value

FacetSetKey

Properties

EqualityContract

protected override Type EqualityContract { get; }

Property Value

Type

Methods

Deconstruct(out string)

public void Deconstruct(out string Value)

Parameters

Value string

Equals(FacetSetKey?)

public virtual bool Equals(FacetSetKey? other)

Parameters

other FacetSetKey

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 ==(FacetSetKey?, FacetSetKey?)

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

Parameters

left FacetSetKey
right FacetSetKey

Returns

bool

implicit operator FacetSetKey(string)

Implicitly convert from a string to FacetSetKey.

public static implicit operator FacetSetKey(string key)

Parameters

key string

String to convert from.

Returns

FacetSetKey

operator !=(FacetSetKey?, FacetSetKey?)

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

Parameters

left FacetSetKey
right FacetSetKey

Returns

bool