public void Handle(RevisionCreatedLocalMessage message)
        {
            _logger.InfoFormat("Parsing comment. Revision ID: {0}", message.Dto.SourceControlID);

            var commentParser     = new CommentParser();
            var actions           = commentParser.ParseAssignToEntityAction(message.Dto);
            var actionParamFiller = new ActionParameterFillerVisitor(message.Dto);

            foreach (var action in actions)
            {
                action.Execute(actionParamFiller, x => _bus.SendLocal(action), _logger);
            }
        }
예제 #2
0
        public void Handle(RevisionAssignableCreatedMessage message)
        {
            var commentParser     = new CommentParser();
            var actions           = commentParser.Parse(Data.RevisionDto, Data.EntityId);
            var actionParamFiller = new ActionParameterFillerVisitor(Data.RevisionDto, Data.EntityId);

            var actionsToExecute = actions.ToArray();

            if (!actionsToExecute.Any())
            {
                MarkAsComplete();
                return;
            }

            _logger.InfoFormat("Processing comment. Revision ID: {0}", Data.RevisionDto.SourceControlID);

            foreach (var action in actionsToExecute)
            {
                action.Execute(actionParamFiller, command => Send(command), _logger);
            }

            MarkAsComplete();
        }