示例#1
0
 protected void MutateInternalState(AtomDocumentCreatedEvent documentCreated)
 {
     this.Author     = documentCreated.Author;
     this.DocumentId = documentCreated.DocumentId;
     this.EarlierEventsDocumentId = documentCreated.EarlierEventsDocumentId;
     this.Title  = documentCreated.Title;
     this.FeedId = documentCreated.FeedId;
 }
 protected void MutateInternalState(AtomDocumentCreatedEvent documentCreated)
 {
     this.Author = documentCreated.Author;
     this.DocumentId = documentCreated.DocumentId;
     this.EarlierEventsDocumentId = documentCreated.EarlierEventsDocumentId;
     this.Title = documentCreated.Title;
     this.FeedId = documentCreated.FeedId;
 }
示例#3
0
        private void Process(CreateAtomDocumentCommand createDocument)
        {
            var createdEvent = new AtomDocumentCreatedEvent(
                createDocument.Title,
                createDocument.Author,
                createDocument.DocumentId);

            Persist(createdEvent, MutateInternalState);
        }
        private void Process(CreateAtomDocumentCommand createDocument)
        {
            subscriptionActor = Context.Sender;

            var createdEvent = new AtomDocumentCreatedEvent(
                createDocument.Title,
                createDocument.Author,
                createDocument.DocumentId);

            Persist(createdEvent, MutateInternalState);
        }
示例#5
0
        protected void MutateInternalState(AtomDocumentCreatedEvent documentCreated)
        {
            this.Author                  = documentCreated.Author;
            this.DocumentId              = documentCreated.DocumentId;
            this.CurrentDocumentId       = documentCreated.DocumentId;
            this.EarlierEventsDocumentId = documentCreated.EarlierEventsDocumentId;
            this.Title  = documentCreated.Title;
            this.FeedId = documentCreated.DocumentId.FeedId;

            DocumentCreationDate = DateTime.Now;

            PollSubscriptionQueue();
        }