fix hints and warnings
This commit is contained in:
@@ -3,7 +3,6 @@ using PointCloudWeb.Server.Models;
|
||||
using PointCloudWeb.Server.Services;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace PointCloudWeb.Server.Controllers
|
||||
{
|
||||
@@ -11,11 +10,11 @@ namespace PointCloudWeb.Server.Controllers
|
||||
[Route("[controller]")]
|
||||
public class PointCloudController
|
||||
{
|
||||
private readonly PointCloudService pointCloudService;
|
||||
private readonly PointCloudService _pointCloudService;
|
||||
|
||||
public PointCloudController(PointCloudService pointCloudService)
|
||||
{
|
||||
this.pointCloudService = pointCloudService;
|
||||
this._pointCloudService = pointCloudService;
|
||||
}
|
||||
|
||||
private PointCloudDto ConvertPointCloudToDto(PointCloud pc) => new PointCloudDto(pc.Id, pc.TransformedPoints);
|
||||
@@ -24,7 +23,7 @@ namespace PointCloudWeb.Server.Controllers
|
||||
public IList<PointCloudDto> GetAll()
|
||||
{
|
||||
var result = new List<PointCloudDto>();
|
||||
foreach (var pc in pointCloudService.GetAll())
|
||||
foreach (var pc in _pointCloudService.GetAll())
|
||||
result.Add(ConvertPointCloudToDto(pc));
|
||||
|
||||
return result;
|
||||
@@ -33,7 +32,7 @@ namespace PointCloudWeb.Server.Controllers
|
||||
[HttpGet]
|
||||
public PointCloudDto GetById(Guid id)
|
||||
{
|
||||
var pc = pointCloudService.GetById(id) ?? throw new KeyNotFoundException();
|
||||
var pc = _pointCloudService.GetById(id) ?? throw new KeyNotFoundException();
|
||||
return ConvertPointCloudToDto(pc);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user