コード例 #1
0
        private Either <InstallationError, InstallationDto> RunIntegration(Either <InstallationError, InstallationDto> context)
        {
            DateTimeOffset beginTime = DateTimeOffset.Now;

            _logger.LogInformation($"Integration process begin at {beginTime}");
            if (context.IsLeft)
            {
                _logger.LogWarning($"Integration process finished due to a core error after {FormatExecTime(beginTime)}");
                return(context);
            }

            if (context.IsRight && context.Get.IsReadValid)
            {
                _logger.LogTrace($"Integration process finished with no action after {FormatExecTime(beginTime)}");
                return(context);
            }
            return(Update(InstallationUpdateCommand.TemporaryDevCreate(context.Get))
                   .Peek(success =>
            {
                _logger.LogInformation($"Integration process finished with success result after {FormatExecTime(beginTime)}");
            })
                   .PeekLeft(failure =>
            {
                _logger.LogWarning($"Integration process finished due to a integration error after {FormatExecTime(beginTime)}");
            }));
        }
コード例 #2
0
 public Either <InstallationError, InstallationDto> Update(InstallationUpdateCommand command)
 {
     // TODO [log]
     throw new System.NotImplementedException();
 }
コード例 #3
0
 public Either <InstallationError, InstallationDto> Update(InstallationUpdateCommand command)
 {
     throw new NotImplementedException();
 }
コード例 #4
0
 public Either <InstallationError, InstallationDto> Update(InstallationUpdateCommand command)
 {
     // TODO [Measurements]
     return(command.TemporaryDevResultFunction());
 }