Ejemplo n.º 1
0
        private CreateProjectResultCommand DoGetCreateProjectStatus(string ticketId)
        {
            using (ICommandReceiver receiver = Factory.GetInstance <ICommandReceiver>().Open(CONST_CreateProjectResultQueueName, string.Format("TicketId = '{0}'", ticketId)))
            {
                CreateProjectResultCommand result = receiver.GetCommand <CreateProjectResultCommand>();

                if (result != null)
                {
                    result.MarkAsCompleted();
                }

                return(result);
            }
        }
Ejemplo n.º 2
0
        private void SendCreateProjectFinished(CreateProjectCommand createProjectCommand, DomainModel.Project project, bool isSuccess)
        {
            Contract.Requires(project != null);

            using (ICommandSender commandSender = Factory.GetInstance <ICommandSender>().Open(CONST_CreateProjectResultQueueName))
            {
                CreateProjectResultCommand command = new CreateProjectResultCommand
                {
                    VkGroupId = project.VkGroup.Id,
                    AccountId = createProjectCommand.AccountId,
                    TicketId  = createProjectCommand.TicketId,
                    IsSuccess = isSuccess,
                    ProjectId = project.Id
                };

                commandSender.SendCommand(command);
            }
        }