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

original WhenClause

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

Type WhenClauseType

The WhenClauseType.

Properties IReadOnlyList<string>

Properties participating in the condition.

FromValue string

Optional source value for transitions.

ToValue string

Optional target value for transitions.

Expression string

Optional raw expression.

Properties

EqualityContract

protected virtual Type EqualityContract { get; }

Property Value

Type

Expression

Optional raw expression.

public string? Expression { get; init; }

Property Value

string

FromValue

Optional source value for transitions.

public string? FromValue { get; init; }

Property Value

string

Properties

Properties participating in the condition.

public IReadOnlyList<string> Properties { get; init; }

Property Value

IReadOnlyList<string>

ToValue

Optional target value for transitions.

public string? ToValue { get; init; }

Property Value

string

Type

public WhenClauseType Type { get; init; }

Property Value

WhenClauseType

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

Type WhenClauseType
Properties IReadOnlyList<string>
FromValue string
ToValue string
Expression string

Equals(WhenClause?)

public virtual bool Equals(WhenClause? other)

Parameters

other WhenClause

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 virtual bool PrintMembers(StringBuilder builder)

Parameters

builder StringBuilder

Returns

bool

ToString()

public override string ToString()

Returns

string

Operators

operator ==(WhenClause?, WhenClause?)

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

Parameters

left WhenClause
right WhenClause

Returns

bool

operator !=(WhenClause?, WhenClause?)

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

Parameters

left WhenClause
right WhenClause

Returns

bool