fix warnings
This commit is contained in:
@@ -9,4 +9,8 @@
|
||||
<Platforms>AnyCPU;x64</Platforms>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="Excel\" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
@@ -25,7 +25,6 @@ namespace Aperio_Control_Centre.UnitTest.AperioServer
|
||||
private TestingScreenLoggerBridge? _screenLogging;
|
||||
private TestingStatusBroadcastHandler? _statusBroadcast;
|
||||
private IDbContextFactory<ACSDatabaseContext>? _dbContextFactory;
|
||||
//private TestingAperioConnectionContext? _aperioConnectionContext;
|
||||
private TestingLogger<AperioBase>? _logger;
|
||||
|
||||
public AperioBase CreateAperioBase()
|
||||
@@ -87,7 +86,7 @@ namespace Aperio_Control_Centre.UnitTest.AperioServer
|
||||
public void AperioBaseDevice_SetConnection_ConnectionID_Test()
|
||||
{
|
||||
AperioBase device = CreateAperioBase();
|
||||
Assert.AreEqual("ABDCEDFG", device.Connection.ConnectionId);
|
||||
Assert.AreEqual("ABDCEDFG", device.Connection?.ConnectionId);
|
||||
|
||||
var connectionMoq = new Mock<ConnectionContext>();
|
||||
connectionMoq.Setup(s => s.ConnectionId).Returns("XYZ123");
|
||||
@@ -101,7 +100,7 @@ namespace Aperio_Control_Centre.UnitTest.AperioServer
|
||||
|
||||
device.SetConnection(aperioConnectionContext, TestContext.CancellationToken).Wait(TestContext.CancellationToken);
|
||||
|
||||
Assert.AreEqual("XYZ123", device.Connection.ConnectionId);
|
||||
Assert.AreEqual("XYZ123", device.Connection?.ConnectionId);
|
||||
|
||||
Assert.IsNotNull(_statusBroadcast);
|
||||
Assert.IsEmpty(_statusBroadcast.Messages);
|
||||
|
||||
@@ -35,6 +35,8 @@ namespace Aperio_Control_Centre.Api
|
||||
return Json("This represents no monetary value");
|
||||
}
|
||||
|
||||
#pragma warning disable CA5391
|
||||
|
||||
//POST: v2/api/credentialrequest
|
||||
//{"Device":"0361A7","Name":"API test device","ProductClass":23,"Reader":2,"ReaderData":"E2C9FBA004 0909000100 0000000000 0000000000 B3DC49B384C1D5F34C8E232316D65821", "ReaderName":"reader 1"}
|
||||
[HttpPost("credentialrequest")]
|
||||
@@ -404,5 +406,7 @@ namespace Aperio_Control_Centre.Api
|
||||
});
|
||||
return Json(model);
|
||||
}
|
||||
|
||||
#pragma warning restore CA5391
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,14 +7,12 @@ using Aperio_Control_Centre.Models;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.Localization;
|
||||
|
||||
namespace Aperio_Control_Centre.Controllers
|
||||
{
|
||||
public class AuthorizationController(IDbContextFactory<ACSDatabaseContext> dbContextFactory, IStringLocalizer<AuthorizationController> localizer) : Controller
|
||||
public class AuthorizationController(IDbContextFactory<ACSDatabaseContext> dbContextFactory ) : Controller
|
||||
{
|
||||
private readonly IDbContextFactory<ACSDatabaseContext> _contextFactory = dbContextFactory;
|
||||
private readonly IStringLocalizer<AuthorizationController> _localizer = localizer;
|
||||
|
||||
// GET: Authorization
|
||||
[HttpGet]
|
||||
|
||||
@@ -316,7 +316,7 @@ namespace Aperio_Control_Centre.Controllers
|
||||
//Debug.WriteLine("start date = " + exportLogging.StartDateTime);
|
||||
//Debug.WriteLine("end date = " + exportLogging.EndDateTime);
|
||||
|
||||
exportLogging.LoggingsList = await GetLogList(exportLogging, token);
|
||||
exportLogging.LoggingsList.AddRange(await GetLogList(exportLogging, token));
|
||||
this.CreateTitle();
|
||||
return View(exportLogging);
|
||||
}
|
||||
|
||||
@@ -19,13 +19,13 @@ namespace Aperio_Control_Centre.Models
|
||||
public DateTime EndDateTime { get; set; }
|
||||
|
||||
|
||||
public List<Logging> LoggingsList { get; set; } = [];
|
||||
public List<Logging> LoggingsList { get; } = [];
|
||||
|
||||
|
||||
[Display(Name = "Log type selectie")]
|
||||
public List<SelectListItem> LogTypeSelectList { get; } = [];
|
||||
|
||||
[Display(Name = "Apparaat selectie")]
|
||||
public List<SelectListItem> DeviceSelectList { get; } = [];
|
||||
public List<SelectListItem> DeviceSelectList { get; } = [];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user