Exemple #1
0
 private EventStream(TEntityId aggregateId, AggregationName aggregationName, Version version, IImmutableList <IDomainEvent> events)
 {
     AggregationId = aggregateId;
     Name          = aggregationName;
     Version       = version;
     Events        = events;
 }
        public static AggregationName From(string current)
        {
            var aggregationName = new AggregationName(current);
            var validator       = new AggregationNameValidator();

            aggregationName.SetValidationResult(validator.Validate(aggregationName));

            return(aggregationName);
        }
Exemple #3
0
        public static EventStream <TEntityId> From(TEntityId aggregateId, AggregationName name, Version version, IImmutableList <IDomainEvent> events)
        {
            var eventStream = new EventStream <TEntityId>(aggregateId, name, version, events);

            return(eventStream);
        }