Class ClosesStreamConstraintsProvider

Namespace
Cratis.Chronicle.Events.Constraints
Assembly
Cratis.Chronicle.dll

Provides closing constraints discovered from event types carrying ClosesStreamAttribute.

public class ClosesStreamConstraintsProvider : ICanProvideConstraints
Inheritance
ClosesStreamConstraintsProvider
Implements
Inherited Members
Extension Methods

Constructors

ClosesStreamConstraintsProvider(IClientArtifactsProvider, IEventTypes, INamingPolicy)

Provides closing constraints discovered from event types carrying ClosesStreamAttribute.

public ClosesStreamConstraintsProvider(IClientArtifactsProvider clientArtifactsProvider, IEventTypes eventTypes, INamingPolicy namingPolicy)

Parameters

clientArtifactsProvider IClientArtifactsProvider

The client artifacts.

eventTypes IEventTypes

The event types and schemas.

namingPolicy INamingPolicy

The payload naming policy.

Methods

Provide()

Provide constraints.

public IImmutableList<IConstraintDefinition> Provide()

Returns

IImmutableList<IConstraintDefinition>

Collection of Constraint.

Exceptions

PropertyDoesNotExistOnEventType

A closing or reopening type lacks the declared property.

ConflictingClosesStreamDeclarations

Same-named declarations disagree on their scope.

MissingNameForClosesStreamConstraint

A declaration uses the reserved manual owner name.