Class ConstraintScope
- Namespace
- Cratis.Chronicle.Events.Constraints
- Assembly
- Cratis.Chronicle.dll
Represents the scope of a constraint, defining optional boundaries for constraint validation.
public record ConstraintScope : IEquatable<ConstraintScope>
- Inheritance
-
ConstraintScope
- Implements
- Inherited Members
- Extension Methods
Constructors
ConstraintScope(ConstraintScope)
protected ConstraintScope(ConstraintScope original)
Parameters
originalConstraintScope
ConstraintScope(EventSourceType?, EventStreamType?, EventStreamId?)
Represents the scope of a constraint, defining optional boundaries for constraint validation.
public ConstraintScope(EventSourceType? EventSourceType = null, EventStreamType? EventStreamType = null, EventStreamId? EventStreamId = null)
Parameters
EventSourceTypeEventSourceTypeOptional EventSourceType to scope the constraint to.
EventStreamTypeEventStreamTypeOptional EventStreamType to scope the constraint to.
EventStreamIdEventStreamIdOptional EventStreamId to scope the constraint to.
Fields
None
Represents a constraint scope with no scoping applied.
public static readonly ConstraintScope None
Field Value
Properties
EqualityContract
protected virtual Type EqualityContract { get; }
Property Value
EventSourceType
Optional EventSourceType to scope the constraint to.
public EventSourceType? EventSourceType { get; init; }
Property Value
EventStreamId
Optional EventStreamId to scope the constraint to.
public EventStreamId? EventStreamId { get; init; }
Property Value
EventStreamType
Optional EventStreamType to scope the constraint to.
public EventStreamType? EventStreamType { get; init; }
Property Value
HasScope
Gets a value indicating whether this scope has any scoping applied.
public bool HasScope { get; }
Property Value
Methods
Deconstruct(out EventSourceType?, out EventStreamType?, out EventStreamId?)
public void Deconstruct(out EventSourceType? EventSourceType, out EventStreamType? EventStreamType, out EventStreamId? EventStreamId)
Parameters
EventSourceTypeEventSourceTypeEventStreamTypeEventStreamTypeEventStreamIdEventStreamId
Equals(ConstraintScope?)
public virtual bool Equals(ConstraintScope? other)
Parameters
otherConstraintScope
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 ==(ConstraintScope?, ConstraintScope?)
public static bool operator ==(ConstraintScope? left, ConstraintScope? right)
Parameters
leftConstraintScoperightConstraintScope
Returns
operator !=(ConstraintScope?, ConstraintScope?)
public static bool operator !=(ConstraintScope? left, ConstraintScope? right)
Parameters
leftConstraintScoperightConstraintScope