diff --git a/AsbCloudApp/Services/IUserSettingsRepository.cs b/AsbCloudApp/Services/IUserSettingsRepository.cs
index b2287918..6849409d 100644
--- a/AsbCloudApp/Services/IUserSettingsRepository.cs
+++ b/AsbCloudApp/Services/IUserSettingsRepository.cs
@@ -25,7 +25,7 @@ namespace AsbCloudApp.Services
///
///
///
- Task GetOrDefaultAsync(int userId, string key, CancellationToken token);
+ Task GetOrDefaultAsync(int userId, string key, CancellationToken token);
///
/// Добавить или изменить настройки с ключем для пользователя
diff --git a/AsbCloudInfrastructure/Repository/UserSettingsRepository.cs b/AsbCloudInfrastructure/Repository/UserSettingsRepository.cs
index f8451d02..8754b3c1 100644
--- a/AsbCloudInfrastructure/Repository/UserSettingsRepository.cs
+++ b/AsbCloudInfrastructure/Repository/UserSettingsRepository.cs
@@ -16,7 +16,7 @@ namespace AsbCloudInfrastructure.Repository
this.context = context;
}
- public Task GetOrDefaultAsync(int userId, string key, CancellationToken token)
+ public Task GetOrDefaultAsync(int userId, string key, CancellationToken token)
=> context.Set()
.Where(s => s.IdUser == userId && s.Key == key)
.Select(s => s.Value)
diff --git a/AsbCloudWebApi/AsbCloudWebApi.csproj b/AsbCloudWebApi/AsbCloudWebApi.csproj
index 4a1f5733..5f231625 100644
--- a/AsbCloudWebApi/AsbCloudWebApi.csproj
+++ b/AsbCloudWebApi/AsbCloudWebApi.csproj
@@ -6,6 +6,7 @@
true
$(NoWarn);1591
80899ceb-210f-4f19-ac56-aa90a5d666d4
+ enable
diff --git a/AsbCloudWebApi/Controllers/SAUB/DetectedOperationController.cs b/AsbCloudWebApi/Controllers/SAUB/DetectedOperationController.cs
index 244528a3..ee3ba8f3 100644
--- a/AsbCloudWebApi/Controllers/SAUB/DetectedOperationController.cs
+++ b/AsbCloudWebApi/Controllers/SAUB/DetectedOperationController.cs
@@ -145,7 +145,7 @@ namespace AsbCloudWebApi.Controllers.SAUB
else
{
if (!await wellService.IsCompanyInvolvedInWellAsync((int)idCompany,
- (int)idWell, token).ConfigureAwait(false))
+ idWell!.Value, token).ConfigureAwait(false))
return Forbid();
idsWells = new List { (int)idWell };
}
diff --git a/AsbCloudWebApi/Middlewares/SimplifyExceptionsMiddleware.cs b/AsbCloudWebApi/Middlewares/SimplifyExceptionsMiddleware.cs
index dd9fff9f..589d8f9f 100644
--- a/AsbCloudWebApi/Middlewares/SimplifyExceptionsMiddleware.cs
+++ b/AsbCloudWebApi/Middlewares/SimplifyExceptionsMiddleware.cs
@@ -19,7 +19,7 @@ namespace AsbCloudWebApi.Middlewares
{
try
{
- await next?.Invoke(context);
+ await next.Invoke(context);
}
catch (ArgumentInvalidException ex)
{
diff --git a/AsbCloudWebApi/PermissionAttribute.cs b/AsbCloudWebApi/PermissionAttribute.cs
index 7eeff776..1249b531 100644
--- a/AsbCloudWebApi/PermissionAttribute.cs
+++ b/AsbCloudWebApi/PermissionAttribute.cs
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
+using System.Runtime.CompilerServices;
namespace AsbCloudWebApi
{
@@ -8,7 +9,7 @@ namespace AsbCloudWebApi
{
public static SortedSet Registered { get; } = new SortedSet();
- public string Name { get; set; }
+ public string Name { get; set; } = null!;
///
/// Проверка наличия у пользователя разрешения с именем "{ControllerName}.{http_method}".
diff --git a/AsbCloudWebApi/TraceListenerView.cs b/AsbCloudWebApi/TraceListenerView.cs
deleted file mode 100644
index bda66d1c..00000000
--- a/AsbCloudWebApi/TraceListenerView.cs
+++ /dev/null
@@ -1,27 +0,0 @@
-using System.Diagnostics;
-
-namespace AsbCloudWebApi
-{
- public class TraceListenerView : TraceListener
- {
- public TraceListenerView()
- {
- Trace.Listeners.Add(this);
- }
-
- public override void Write(object o)
- {
- base.Write(o);
- }
-
- public override void Write(string message)
- {
- //throw new NotImplementedException();
- }
-
- public override void WriteLine(string message)
- {
- //throw new NotImplementedException();
- }
- }
-}