Class WhenClause
- Namespace
- Cratis.Chronicle.Concepts.Captures
- Assembly
- Cratis.Chronicle.dll
Represents the condition for appending an event.
public record WhenClause : IEquatable<WhenClause>
- Inheritance
-
WhenClause
- Implements
- Inherited Members
- Extension Methods
Constructors
WhenClause(WhenClause)
protected WhenClause(WhenClause original)
Parameters
originalWhenClause
WhenClause(WhenClauseType, IReadOnlyList<string>, string?, string?, string?)
Represents the condition for appending an event.
public WhenClause(WhenClauseType Type, IReadOnlyList<string> Properties, string? FromValue = null, string? ToValue = null, string? Expression = null)
Parameters
TypeWhenClauseTypeThe WhenClauseType.
PropertiesIReadOnlyList<string>Properties participating in the condition.
FromValuestringOptional source value for transitions.
ToValuestringOptional target value for transitions.
ExpressionstringOptional raw expression.
Properties
EqualityContract
protected virtual Type EqualityContract { get; }
Property Value
Expression
Optional raw expression.
public string? Expression { get; init; }
Property Value
FromValue
Optional source value for transitions.
public string? FromValue { get; init; }
Property Value
Properties
Properties participating in the condition.
public IReadOnlyList<string> Properties { get; init; }
Property Value
ToValue
Optional target value for transitions.
public string? ToValue { get; init; }
Property Value
Type
The WhenClauseType.
public WhenClauseType Type { get; init; }
Property Value
Methods
Deconstruct(out WhenClauseType, out IReadOnlyList<string>, out string?, out string?, out string?)
public void Deconstruct(out WhenClauseType Type, out IReadOnlyList<string> Properties, out string? FromValue, out string? ToValue, out string? Expression)
Parameters
TypeWhenClauseTypePropertiesIReadOnlyList<string>FromValuestringToValuestringExpressionstring
Equals(WhenClause?)
public virtual bool Equals(WhenClause? other)
Parameters
otherWhenClause
Returns
Equals(object?)
public override bool Equals(object? obj)
Parameters
objobject
Returns
GetHashCode()
public override int GetHashCode()
Returns
PrintMembers(StringBuilder)
protected virtual bool PrintMembers(StringBuilder builder)
Parameters
builderStringBuilder
Returns
ToString()
public override string ToString()
Returns
Operators
operator ==(WhenClause?, WhenClause?)
public static bool operator ==(WhenClause? left, WhenClause? right)
Parameters
leftWhenClauserightWhenClause
Returns
operator !=(WhenClause?, WhenClause?)
public static bool operator !=(WhenClause? left, WhenClause? right)
Parameters
leftWhenClauserightWhenClause