示例#1
0
 private void Apply(NewSimpleCreatedEvent theEvent)
 {
     Id           = theEvent.Id;
     _createdDate = theEvent.CreatedDate;
     _fooHolder.Add(theEvent.Foo);
     ++_numberOfEventsApplied;
 }
 private void Apply(NewSimpleCreatedEvent theEvent)
 {
     Id = theEvent.Id;
     _logicContainer = new SimpleAggregateDataContainer();
     _logicContainer.AddFooHolder(theEvent.Foo);
     _logicContainer.IncrementAppliedEventCount();
 }
示例#3
0
        public SimpleAggregate(Guid aggregateId, DateTime createdDate, int foo)
        {
            Id              = aggregateId;
            _fooHolder      = new List <int>();
            _createdDate    = createdDate;
            _fooChangedDate = createdDate;

            var theEvent = new NewSimpleCreatedEvent(aggregateId, createdDate, foo);

            RaiseEvent(theEvent);
        }
        public SimpleAggregate(Guid aggregateId, DateTime createdDate, int foo)
        {
            var theEvent = new NewSimpleCreatedEvent(aggregateId, createdDate, foo);

            RaiseEvent(theEvent);
        }