コード例 #1
0
 public void Execute(out BaseResponseDto responseDto)
 {
     responseDto = new BaseResponseDto();
     try
     {
         responseDto.Success = simulator.AddBattleship(requestDto);
         responseDto.Message = responseDto.Success ? "Battleship placed successfully" : "Something went wrong";
     }
     catch (ArgumentException exception)
     {
         responseDto.Success   = false;
         responseDto.Exception = exception;
     }
 }