Beispiel #1
0
        public void UpdateContent(Title title, Content content)
        {
            if (enabled == false)
            {
                throw new DomainException("The blog is disabled. Enable this before making any changes.");
            }

            Raise(PostContentUpdatedDomainEvent.Create(this, title, content));
        }
Beispiel #2
0
 protected void When(PostContentUpdatedDomainEvent @event)
 {
     title   = @event.Title;
     content = @event.Content;
 }