From 657c542cb206b19b7a235ec6aabf417139f405e1 Mon Sep 17 00:00:00 2001 From: ngfrolov Date: Thu, 18 Jan 2024 11:05:22 +0500 Subject: [PATCH 1/3] Update nugets --- AsbCloudDb/AsbCloudDb.csproj | 4 ++-- .../AsbCloudInfrastructure.csproj | 20 +++++++++---------- .../Repository/ProcessMapPlanRepository.cs | 1 - .../AsbCloudWebApi.IntegrationTests.csproj | 11 +++++----- .../MatchHelper.cs | 6 +++--- .../UserConnectionsLimitMiddlwareTest.cs | 2 +- .../AsbCloudWebApi.Tests.csproj | 8 ++++---- AsbCloudWebApi/AsbCloudWebApi.csproj | 17 +++++++++------- 8 files changed, 36 insertions(+), 33 deletions(-) diff --git a/AsbCloudDb/AsbCloudDb.csproj b/AsbCloudDb/AsbCloudDb.csproj index 16b1354f..9d62fdaf 100644 --- a/AsbCloudDb/AsbCloudDb.csproj +++ b/AsbCloudDb/AsbCloudDb.csproj @@ -6,11 +6,11 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + diff --git a/AsbCloudInfrastructure/AsbCloudInfrastructure.csproj b/AsbCloudInfrastructure/AsbCloudInfrastructure.csproj index a1816762..dbaa1e65 100644 --- a/AsbCloudInfrastructure/AsbCloudInfrastructure.csproj +++ b/AsbCloudInfrastructure/AsbCloudInfrastructure.csproj @@ -49,17 +49,17 @@ - - - - + + + + - - - - - - + + + + + + diff --git a/AsbCloudInfrastructure/Repository/ProcessMapPlanRepository.cs b/AsbCloudInfrastructure/Repository/ProcessMapPlanRepository.cs index 1e5a8403..a2a78659 100644 --- a/AsbCloudInfrastructure/Repository/ProcessMapPlanRepository.cs +++ b/AsbCloudInfrastructure/Repository/ProcessMapPlanRepository.cs @@ -10,7 +10,6 @@ using AsbCloudApp.Services; using AsbCloudDb.Model; using AsbCloudDb.Model.ProcessMaps; using Microsoft.EntityFrameworkCore; -using Org.BouncyCastle.Asn1.Ocsp; namespace AsbCloudInfrastructure.Repository; diff --git a/AsbCloudWebApi.IntegrationTests/AsbCloudWebApi.IntegrationTests.csproj b/AsbCloudWebApi.IntegrationTests/AsbCloudWebApi.IntegrationTests.csproj index 1824d4ce..5946859b 100644 --- a/AsbCloudWebApi.IntegrationTests/AsbCloudWebApi.IntegrationTests.csproj +++ b/AsbCloudWebApi.IntegrationTests/AsbCloudWebApi.IntegrationTests.csproj @@ -4,15 +4,16 @@ net6.0 enable enable + af52bb94-3f08-4d6a-8895-8cfb7691c393 - - - + + + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all diff --git a/AsbCloudWebApi.IntegrationTests/MatchHelper.cs b/AsbCloudWebApi.IntegrationTests/MatchHelper.cs index 6a8704f8..9bd8dfa9 100644 --- a/AsbCloudWebApi.IntegrationTests/MatchHelper.cs +++ b/AsbCloudWebApi.IntegrationTests/MatchHelper.cs @@ -8,10 +8,10 @@ public static class MatchHelper public static void Match(T expected, T actual, IEnumerable? excludeProps = null) { if (ReferenceEquals(expected, actual)) - throw new EqualException(expected, actual); + throw EqualException.ForMismatchedValues(expected, actual); if (expected is null || actual is null) - throw new EqualException(expected, actual); + throw EqualException.ForMismatchedValues(expected, actual); var props = typeof(T).GetProperties( BindingFlags.Public @@ -25,7 +25,7 @@ public static class MatchHelper var objValue = prop.GetValue(expected); var anotherValue = prop.GetValue(actual); if (objValue != null && !objValue.Equals(anotherValue)) - throw new EqualException(expected, actual); + throw EqualException.ForMismatchedValues(expected, actual); } } } \ No newline at end of file diff --git a/AsbCloudWebApi.IntegrationTests/Middlware/UserConnectionsLimitMiddlwareTest.cs b/AsbCloudWebApi.IntegrationTests/Middlware/UserConnectionsLimitMiddlwareTest.cs index 1bb5731d..ee1ebe1c 100644 --- a/AsbCloudWebApi.IntegrationTests/Middlware/UserConnectionsLimitMiddlwareTest.cs +++ b/AsbCloudWebApi.IntegrationTests/Middlware/UserConnectionsLimitMiddlwareTest.cs @@ -145,7 +145,7 @@ namespace AsbCloudWebApi.IntegrationTests.Middlware return httpClient; } - private static IServiceCollection ReplaceService(this IServiceCollection services, T instance) + private static IServiceCollection ReplaceService(IServiceCollection services, T instance) where T : notnull { var typeofT = typeof(T); diff --git a/AsbCloudWebApi.Tests/AsbCloudWebApi.Tests.csproj b/AsbCloudWebApi.Tests/AsbCloudWebApi.Tests.csproj index 06d8d055..b538cf94 100644 --- a/AsbCloudWebApi.Tests/AsbCloudWebApi.Tests.csproj +++ b/AsbCloudWebApi.Tests/AsbCloudWebApi.Tests.csproj @@ -19,11 +19,11 @@ - - + + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all diff --git a/AsbCloudWebApi/AsbCloudWebApi.csproj b/AsbCloudWebApi/AsbCloudWebApi.csproj index 8c9b17b8..05ca9173 100644 --- a/AsbCloudWebApi/AsbCloudWebApi.csproj +++ b/AsbCloudWebApi/AsbCloudWebApi.csproj @@ -10,13 +10,16 @@ - - - - - - - + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + From 38fab5b6f0a1211ba13686fa989cddc8f044d5c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9E=D0=BB=D1=8F=20=D0=91=D0=B8=D0=B7=D1=8E=D0=BA=D0=BE?= =?UTF-8?q?=D0=B2=D0=B0?= Date: Fri, 19 Jan 2024 17:19:26 +0500 Subject: [PATCH 2/3] =?UTF-8?q?=D0=A3=D0=B4=D0=B0=D0=BB=D0=B5=D0=BD=D0=BE?= =?UTF-8?q?=20=D1=81=D0=B2=D0=BE=D0=B9=D1=81=D1=82=D0=B2=D0=BE=20Date?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AsbCloudApp/Data/SAUB/TelemetryDataSpinDto.cs | 9 --------- 1 file changed, 9 deletions(-) diff --git a/AsbCloudApp/Data/SAUB/TelemetryDataSpinDto.cs b/AsbCloudApp/Data/SAUB/TelemetryDataSpinDto.cs index 46b9cf28..e4a5ed3e 100644 --- a/AsbCloudApp/Data/SAUB/TelemetryDataSpinDto.cs +++ b/AsbCloudApp/Data/SAUB/TelemetryDataSpinDto.cs @@ -17,15 +17,6 @@ namespace AsbCloudApp.Data.SAUB /// public DateTime DateTime { get; set; } - /// - /// Дата - /// - public DateTime Date - { - get { return DateTime; } - set { DateTime = value; } - } - /// /// Ограничение числа оборотов вправо /// From 7379b6e33d837a27485b37d285a07555602ef679 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9E=D0=BB=D1=8F=20=D0=91=D0=B8=D0=B7=D1=8E=D0=BA=D0=BE?= =?UTF-8?q?=D0=B2=D0=B0?= Date: Fri, 19 Jan 2024 20:18:11 +0500 Subject: [PATCH 3/3] =?UTF-8?q?=D0=9F=D1=80=D0=B8=D0=B2=D0=B5=D0=B4=D0=B5?= =?UTF-8?q?=D0=BD=D0=B8=D0=B5=20=D1=81=D0=B2=D0=BE=D0=B9=D1=81=D1=82=D0=B2?= =?UTF-8?q?=20TelemetryDataSaubDto=20=D0=B2=20=D1=81=D0=BE=D0=BE=D1=82?= =?UTF-8?q?=D0=B2=D0=B5=D1=82=D1=81=D1=82=D0=B2=D0=B8=D0=B5=20=D1=81=D0=BE?= =?UTF-8?q?=20=D1=81=D0=B2=D0=BE=D0=B9=D1=81=D1=82=D0=B2=D0=B0=D0=BC=D0=B8?= =?UTF-8?q?=20TelemetryDataSaub?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AsbCloudApp/Data/SAUB/TelemetryDataSaubDto.cs | 20 ++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/AsbCloudApp/Data/SAUB/TelemetryDataSaubDto.cs b/AsbCloudApp/Data/SAUB/TelemetryDataSaubDto.cs index 56433c36..c2a7944b 100644 --- a/AsbCloudApp/Data/SAUB/TelemetryDataSaubDto.cs +++ b/AsbCloudApp/Data/SAUB/TelemetryDataSaubDto.cs @@ -1,4 +1,5 @@ using System; +using System.ComponentModel.DataAnnotations; namespace AsbCloudApp.Data.SAUB { @@ -23,7 +24,8 @@ namespace AsbCloudApp.Data.SAUB /// 6 - "ПОДЪЕМ С ПРОРАБОТКОЙ" /// 10 - "БЛОКИРОВКА" /// - public short? Mode { get; set; } + [Required] + public short Mode { get; set; } /// /// telemetry id @@ -38,17 +40,17 @@ namespace AsbCloudApp.Data.SAUB /// /// Глубина забоя, м /// - public float? WellDepth { get; set; } + public float WellDepth { get; set; } /// /// Глубина долота, м /// - public float? BitDepth { get; set; } + public float BitDepth { get; set; } /// /// Талевый блок. Положение, м /// - public float? BlockPosition { get; set; } + public float BlockPosition { get; set; } /// /// Талевый блок. Мин положение, м @@ -88,7 +90,7 @@ namespace AsbCloudApp.Data.SAUB /// /// Давление, атм /// - public float? Pressure { get; set; } + public float Pressure { get; set; } /// /// Давление при холостом ходе, атм @@ -123,7 +125,7 @@ namespace AsbCloudApp.Data.SAUB /// /// осевая нагрузка, т /// - public float? AxialLoad { get; set; } + public float AxialLoad { get; set; } /// /// задание осевой нагрузки, т @@ -138,7 +140,7 @@ namespace AsbCloudApp.Data.SAUB /// /// Вес на крюке, т /// - public float? HookWeight { get; set; } + public float HookWeight { get; set; } /// /// Вес на крюке на х.х., т @@ -158,7 +160,7 @@ namespace AsbCloudApp.Data.SAUB /// /// момент ротора, кН*м /// - public float? RotorTorque { get; set; } + public float RotorTorque { get; set; } /// /// момент ротора на х.х., кН*м @@ -178,7 +180,7 @@ namespace AsbCloudApp.Data.SAUB /// /// скорость ротора, об/мин /// - public float? RotorSpeed { get; set; } + public float RotorSpeed { get; set; } /// /// расход, л/с