Class FacetName
- Namespace
- Cratis.Chronicle.Concepts.Patterns
- Assembly
- Cratis.Chronicle.dll
Represents the name of a facet - one contextual dimension a BehaviorPattern can be expressed in.
public record FacetName : ConceptAs<string>, IComparable<ConceptAs<string>>, IComparable<string>, IComparable, IEquatable<ConceptAs<string>>, IEquatable<FacetName>
- Inheritance
-
FacetName
- Implements
- Inherited Members
- Extension Methods
Constructors
FacetName(FacetName)
protected FacetName(FacetName original)
Parameters
originalFacetName
FacetName(string)
Represents the name of a facet - one contextual dimension a BehaviorPattern can be expressed in.
public FacetName(string Value)
Parameters
ValuestringThe actual value.
Fields
AggregateType
The type of the event source the event was appended to.
public static readonly FacetName AggregateType
Field Value
CausedByCommand
The command one level up the causation chain from the one that produced the event.
public static readonly FacetName CausedByCommand
Field Value
CommandType
The type of command - or, when nothing above the event named itself, the event type - that produced the event.
public static readonly FacetName CommandType
Field Value
CorrelationRootId
The correlation the event belongs to, identifying the flow it took part in.
public static readonly FacetName CorrelationRootId
Field Value
Day
The day of week the event occurred on.
public static readonly FacetName Day
Field Value
InitiatorId
The identifier of the initiator that caused the event.
public static readonly FacetName InitiatorId
Field Value
InitiatorType
What kind of initiator caused the event - a user, an agent or the system itself.
public static readonly FacetName InitiatorType
Field Value
Month
The month the event occurred in.
public static readonly FacetName Month
Field Value
OnBehalfOf
The identity the initiator acted on behalf of, when it acted for someone else.
public static readonly FacetName OnBehalfOf
Field Value
TimeBucket
The TimeBucket the event occurred in.
public static readonly FacetName TimeBucket
Field Value
Unspecified
Represents an unspecified FacetName.
public static readonly FacetName Unspecified
Field Value
Year
The year the event occurred in.
public static readonly FacetName Year
Field Value
Properties
EqualityContract
protected override Type EqualityContract { get; }
Property Value
IsAction
Gets a value indicating whether the facet names the action that was taken rather than the context it was taken in.
public bool IsAction { get; }
Property Value
Remarks
The distinction is what separates the question from its answer. A caller describing a situation can name every context facet, because those are things they know - the day, the time of day, the kind of thing being worked on. They cannot name the action, because the action is what they are asking about.
This is not a query-side convenience: confidence is already defined against it, as the frequency of an itemset over the frequency of the same itemset with its action facets removed - the chance of the action given the context. Naming another facet here therefore changes what confidence means for every pattern that constrains it, so it is a modelling decision rather than a filter.
CausedByCommand is deliberately left as context. It reads as an answer to "what usually follows this" and as context to "what does this person do on a Monday", and only one of those can be true of a single definition.
Methods
Deconstruct(out string)
public void Deconstruct(out string Value)
Parameters
Valuestring
Equals(FacetName?)
public virtual bool Equals(FacetName? other)
Parameters
otherFacetName
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 ==(FacetName?, FacetName?)
public static bool operator ==(FacetName? left, FacetName? right)
Parameters
Returns
implicit operator FacetName(string)
Implicitly convert from a string to FacetName.
public static implicit operator FacetName(string name)
Parameters
namestringString to convert from.
Returns
operator !=(FacetName?, FacetName?)
public static bool operator !=(FacetName? left, FacetName? right)