private void Process(CreateAtomDocumentCommand createDocument)
        {
            var createdEvent = new AtomDocumentCreatedEvent(
                createDocument.Title,
                createDocument.Author,
                createDocument.DocumentId);

            Persist(createdEvent, MutateInternalState);
        }
 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;
 }
        private void Process(CreateAtomDocumentCommand createDocument)
        {
            subscriptionActor = Context.Sender;

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

            Persist(createdEvent, MutateInternalState);
        }
        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();
        }