private void Handle(CaseFileAddedEvent caseFileAddedEvent)
        {
            if (string.IsNullOrWhiteSpace(caseFileAddedEvent.Name))
            {
                throw new AggregateValidationException(new List <KeyValuePair <string, string> >
                {
                    new KeyValuePair <string, string>("validation", "name must be specified")
                });
            }

            if (string.IsNullOrWhiteSpace(caseFileAddedEvent.Description))
            {
                throw new AggregateValidationException(new List <KeyValuePair <string, string> >
                {
                    new KeyValuePair <string, string>("validation", "description must be specified")
                });
            }

            AggregateId    = caseFileAddedEvent.AggregateId;
            FileId         = caseFileAddedEvent.FileId;
            Name           = caseFileAddedEvent.Name;
            Description    = caseFileAddedEvent.Description;
            CreateDateTime = caseFileAddedEvent.CreateDateTime;
            Owner          = caseFileAddedEvent.Owner;
            Payload        = caseFileAddedEvent.Payload;
            Version        = caseFileAddedEvent.Version;
            Status         = CaseFileStatus.Edited;
        }
 private void Handle(CaseFilePublishedEvent caseFilePublishedEvent)
 {
     Status = CaseFileStatus.Published;
 }