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
originalFacetValue
FacetValue(string)
Represents the value a facet holds for a single event or pattern.
public FacetValue(string Value)
Parameters
ValuestringThe actual value.
Fields
Unspecified
Represents an unspecified FacetValue.
public static readonly FacetValue Unspecified
Field Value
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
IsSpecified
Gets a value indicating whether the facet holds a value.
public bool IsSpecified { get; }
Property Value
Methods
Deconstruct(out string)
public void Deconstruct(out string Value)
Parameters
Valuestring
Equals(FacetValue?)
public virtual bool Equals(FacetValue? other)
Parameters
otherFacetValue
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 ==(FacetValue?, FacetValue?)
public static bool operator ==(FacetValue? left, FacetValue? right)
Parameters
leftFacetValuerightFacetValue
Returns
implicit operator FacetValue(string?)
Implicitly convert from a string to FacetValue.
public static implicit operator FacetValue(string? value)
Parameters
valuestringString to convert from.
Returns
operator !=(FacetValue?, FacetValue?)
public static bool operator !=(FacetValue? left, FacetValue? right)
Parameters
leftFacetValuerightFacetValue