コード例 #1
0
        public void Handle(MetadataDefinitionRegexChangedEvent @event)
        {
            if (!_repository.Exists(@event.AggregateIdentity))
            {
                throw new AggregateNotFoundException();
            }

            _repository.Update(from p in _repository.Get(@event.AggregateIdentity)
                               select p.WithNewRegularExpression(@event.Regex));
        }
コード例 #2
0
 public void Handle(MetadataDefinitionRegexChangedEvent @event)
 {
     _repository.Update(from projection in _repository.Get(@event.AggregateIdentity)
                        select projection.WithNewRegularExpression(@event.Regex));
 }