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
originalFacetSetKey
FacetSetKey(string)
Represents the canonical, stable identity of a FacetSet.
public FacetSetKey(string Value)
Parameters
ValuestringThe 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
Properties
EqualityContract
protected override Type EqualityContract { get; }
Property Value
Methods
Deconstruct(out string)
public void Deconstruct(out string Value)
Parameters
Valuestring
Equals(FacetSetKey?)
public virtual bool Equals(FacetSetKey? other)
Parameters
otherFacetSetKey
Returns
Equals(ConceptAs<string>?)
public override sealed bool Equals(ConceptAs<string>? other)
Parameters
Returns
Equals(object?)
public override bool Equals(object? obj)
Parameters
objobject
Returns
GetHashCode()
public override int GetHashCode()
Returns
PrintMembers(StringBuilder)
protected override bool PrintMembers(StringBuilder builder)
Parameters
builderStringBuilder
Returns
Operators
operator ==(FacetSetKey?, FacetSetKey?)
public static bool operator ==(FacetSetKey? left, FacetSetKey? right)
Parameters
leftFacetSetKeyrightFacetSetKey
Returns
implicit operator FacetSetKey(string)
Implicitly convert from a string to FacetSetKey.
public static implicit operator FacetSetKey(string key)
Parameters
keystringString to convert from.
Returns
operator !=(FacetSetKey?, FacetSetKey?)
public static bool operator !=(FacetSetKey? left, FacetSetKey? right)
Parameters
leftFacetSetKeyrightFacetSetKey