Esempio n. 1
0
 /// <inheritdoc />
 protected override async Task HandleCore(UpdateBuildTags command)
 {
     await aggregateRepository.UpdateById <Build>(
         command.BuildId,
         build =>
     {
         UpdateTags(build, command);
         return(Task.CompletedTask);
     }
         );
 }
Esempio n. 2
0
        /// <inheritdoc />
        protected override async Task HandleCore(DeleteBuild command)
        {
            logger.LogInformation($"Received command DeleteBuild: BuildId: {command.BuildId}.");

            await aggregateRepository.UpdateById <Build>(command.BuildId,
                                                         build =>
            {
                build.MarkAsUnTracked(command.DeleteDate);
                return(Task.CompletedTask);
            });

            logger.LogInformation($"Build aggregate Id: { command.BuildId } has been deleted successfully.");
        }
        /// <inheritdoc />
        protected override async Task HandleCore(UpdateDistribution command)
        {
            await aggregateRepository.UpdateById <Distribution>(command.Id,
                                                                distribution =>
            {
                distribution.UpdateName(command.Name.Trim());

                UpdateOwners(command, distribution);
                UpdateAvailableLifeCycles(command, distribution);
                UpdateLifeCycleRules(command, distribution);
                UpdateBuildBindings(command, distribution);
                UpdateProjectBindings(command, distribution);

                return(Task.CompletedTask);
            });
        }
Esempio n. 4
0
 /// <inheritdoc />
 protected override async Task HandleCore(T command) =>
 await AggregateRepository.UpdateById <Build>(command.BuildId, build => UpdateBuild(build, command));