включил NULLABLE на весь проект. Удалил директивы #nullable для компилятора

This commit is contained in:
ngfrolov 2023-04-18 16:22:53 +05:00
parent 6c694ff7bc
commit 4cb42c9f72
Signed by untrusted user who does not match committer: ng.frolov
GPG Key ID: E99907A0357B29A7
106 changed files with 203 additions and 206 deletions

View File

@ -2,6 +2,7 @@
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">

View File

@ -94,5 +94,5 @@ namespace AsbCloudInfrastructure.Background
}
}
}
#nullable disable
}

View File

@ -4,7 +4,7 @@ using System.Threading.Tasks;
namespace AsbCloudInfrastructure.Background
{
#nullable enable
/// <summary>
/// Класс разовой работы.
/// Разовая работа приоритетнее периодической.
@ -65,5 +65,5 @@ namespace AsbCloudInfrastructure.Background
ActionAsync = actionAsync;
}
}
#nullable disable
}

View File

@ -4,7 +4,7 @@ using System.Threading.Tasks;
namespace AsbCloudInfrastructure.Background
{
#nullable enable
/// <summary>
/// Класс периодической работы.
/// </summary>
@ -32,5 +32,5 @@ namespace AsbCloudInfrastructure.Background
Period = period;
}
}
#nullable disable
}

View File

@ -4,7 +4,7 @@ using System.Linq;
namespace AsbCloudInfrastructure.Background
{
#nullable enable
/// <summary>
/// <para>
/// Очередь работ
@ -103,5 +103,5 @@ namespace AsbCloudInfrastructure.Background
return work;
}
}
#nullable disable
}

View File

@ -2,7 +2,7 @@
namespace AsbCloudInfrastructure
{
#nullable enable
public static class DateTimeExtentions
{
/// <summary>
@ -78,5 +78,5 @@ namespace AsbCloudInfrastructure
return indexOfMiddle;
}
}
#nullable disable
}

View File

@ -28,7 +28,7 @@ using System;
namespace AsbCloudInfrastructure
{
#nullable enable
public static class DependencyInjection
{
public static IAsbCloudDbContext MakeContext(string connectionString)
@ -215,5 +215,5 @@ namespace AsbCloudInfrastructure
.AddTransient(provider => new Lazy<TService>(() => implementationFactory(provider)));
}
#nullable disable
}

View File

@ -8,7 +8,7 @@ using System.Threading.Tasks;
namespace AsbCloudInfrastructure
{
#nullable enable
public static class MemoryCacheExtentions
{
private static readonly TimeSpan CacheOlescence = TimeSpan.FromMinutes(5);

View File

@ -5,7 +5,7 @@ using System.Linq.Expressions;
namespace AsbCloudInfrastructure
{
#nullable enable
/// <summary>
/// stolen from https://github.com/lotosbin/BinbinPredicateBuilder
/// </summary>
@ -77,4 +77,3 @@ namespace AsbCloudInfrastructure
}
}
}
#nullable disable

View File

@ -8,7 +8,7 @@ using System.Linq;
namespace AsbCloudInfrastructure
{
#nullable enable
public class ReportDataSourcePgCloud : IReportDataSource
{
private readonly IAsbCloudDbContext context;
@ -159,5 +159,5 @@ namespace AsbCloudInfrastructure
public WellInfoReport GetWellInfo()
=> info;
}
#nullable disable
}

View File

@ -9,7 +9,7 @@ using System.Threading.Tasks;
namespace AsbCloudInfrastructure.Repository
{
#nullable enable
public class CacheBase<TEntity> : QueryContainer<TEntity>
where TEntity : class, AsbCloudDb.Model.IId
{
@ -58,5 +58,5 @@ namespace AsbCloudInfrastructure.Repository
return cache;
}
}
#nullable disable
}

View File

@ -11,7 +11,7 @@ using System.Threading.Tasks;
namespace AsbCloudInfrastructure.Repository
{
#nullable enable
/// <summary>
/// CRUD ñåðâèñ ñ êåøåì â îïåðàòèâêå
/// </summary>
@ -110,5 +110,5 @@ namespace AsbCloudInfrastructure.Repository
protected virtual TEntity Convert(TDto src) => src.Adapt<TEntity>();
}
#nullable disable
}

View File

@ -10,7 +10,7 @@ using System.Threading.Tasks;
namespace AsbCloudInfrastructure.Repository
{
#nullable enable
/// <summary>
/// CRUD сервис для работы с БД
/// </summary>
@ -133,5 +133,5 @@ namespace AsbCloudInfrastructure.Repository
protected virtual TEntity Convert(TDto src) => src.Adapt<TEntity>();
}
#nullable disable
}

View File

@ -10,7 +10,7 @@ using System.Threading.Tasks;
namespace AsbCloudInfrastructure.Repository
{
#nullable enable
public class CrudWellRelatedCacheRepositoryBase<TDto, TEntity> : CrudCacheRepositoryBase<TDto, TEntity>, IRepositoryWellRelated<TDto>
where TDto : AsbCloudApp.Data.IId, AsbCloudApp.Data.IWellRelated
where TEntity : class, IId, IWellRelated
@ -46,5 +46,5 @@ namespace AsbCloudInfrastructure.Repository
return dtos;
}
}
#nullable disable
}

View File

@ -9,7 +9,7 @@ using System.Threading.Tasks;
namespace AsbCloudInfrastructure.Repository
{
#nullable enable
public class CrudWellRelatedRepositoryBase<TDto, TEntity> : CrudRepositoryBase<TDto, TEntity>, IRepositoryWellRelated<TDto>
where TDto : AsbCloudApp.Data.IId, AsbCloudApp.Data.IWellRelated
where TEntity : class, IId, IWellRelated
@ -41,5 +41,5 @@ namespace AsbCloudInfrastructure.Repository
return dtos;
}
}
#nullable disable
}

View File

@ -11,7 +11,7 @@ using System.Threading.Tasks;
namespace AsbCloudInfrastructure.Repository
{
#nullable enable
public class DepositRepository : IDepositRepository
{
private readonly IAsbCloudDbContext db;
@ -121,5 +121,5 @@ namespace AsbCloudInfrastructure.Repository
return dtos;
}
}
#nullable disable
}

View File

@ -13,7 +13,7 @@ using System.Threading.Tasks;
namespace AsbCloudInfrastructure.Repository
{
#nullable enable
public class FileRepository : IFileRepository
{
private readonly IQueryable<FileInfo> dbSetConfigured;
@ -288,5 +288,5 @@ namespace AsbCloudInfrastructure.Repository
return dto;
}
}
#nullable disable
}

View File

@ -8,7 +8,7 @@ using System.Threading.Tasks;
namespace AsbCloudInfrastructure.Repository
{
#nullable enable
public class FileStorageRepository : IFileStorageRepository
{
/// <summary>
@ -117,5 +117,5 @@ namespace AsbCloudInfrastructure.Repository
Directory.CreateDirectory(directoryName);
}
}
#nullable disable
}

View File

@ -13,7 +13,7 @@ using System.Threading.Tasks;
namespace AsbCloudInfrastructure.Repository
{
#nullable enable
public class GtrWitsRepository : IGtrRepository
{
private readonly IAsbCloudDbContext db;
@ -156,5 +156,5 @@ namespace AsbCloudInfrastructure.Repository
public JsonValue Item { get; set; } = default!;
}
}
#nullable disable
}

View File

@ -11,7 +11,7 @@ using System.Threading.Tasks;
namespace AsbCloudInfrastructure.Repository
{
#nullable enable
public class LimitingParameterRepository : ILimitingParameterRepository
{
private readonly IAsbCloudDbContext context;
@ -75,5 +75,5 @@ namespace AsbCloudInfrastructure.Repository
return query;
}
}
#nullable disable
}

View File

@ -13,7 +13,7 @@ using System.Threading.Tasks;
namespace AsbCloudInfrastructure.Repository
{
#nullable enable
public class PlannedTrajectoryRepository : IPlannedTrajectoryRepository
{
private readonly IAsbCloudDbContext db;
@ -116,5 +116,5 @@ namespace AsbCloudInfrastructure.Repository
return entity;
}
}
#nullable disable
}

View File

@ -15,7 +15,7 @@ using System.Threading.Tasks;
namespace AsbCloudInfrastructure.Repository
{
#nullable enable
public class ProcessMapRepository : CrudWellRelatedRepositoryBase<ProcessMapPlanDto, ProcessMap>,
IProcessMapPlanRepository
{
@ -156,5 +156,5 @@ namespace AsbCloudInfrastructure.Repository
return entity;
}
}
#nullable disable
}

View File

@ -5,7 +5,7 @@ using System.Linq;
namespace AsbCloudInfrastructure.Repository
{
#nullable enable
public class QueryContainer<TEntity> where TEntity : class, IId
{
protected readonly IAsbCloudDbContext dbContext;
@ -26,5 +26,5 @@ namespace AsbCloudInfrastructure.Repository
GetQuery = () => makeQuery(dbSet);
}
}
#nullable disable
}

View File

@ -10,7 +10,7 @@ using System.Threading.Tasks;
namespace AsbCloudInfrastructure.Repository
{
#nullable enable
public class ScheduleRepository : CrudWellRelatedRepositoryBase<ScheduleDto, Schedule>, IScheduleRepository
{
private readonly IWellService wellService;
@ -64,5 +64,5 @@ namespace AsbCloudInfrastructure.Repository
return dto;
}
}
#nullable disable
}

View File

@ -11,7 +11,7 @@ using System.Linq;
namespace AsbCloudInfrastructure.Repository
{
#nullable enable
public class SetpointsRequestRepository : CrudWellRelatedCacheRepositoryBase<SetpointsRequestDto, SetpointsRequest>
{
private readonly IWellService wellService;
@ -62,5 +62,5 @@ namespace AsbCloudInfrastructure.Repository
return result;
}
}
#nullable disable
}

View File

@ -12,7 +12,7 @@ using System.Threading.Tasks;
namespace AsbCloudInfrastructure.Repository
{
#nullable enable
public class TelemetryWirelineRunOutRepository : ITelemetryWirelineRunOutRepository
{
private readonly IAsbCloudDbContext context;
@ -105,5 +105,5 @@ namespace AsbCloudInfrastructure.Repository
return dto;
}
}
#nullable disable
}

View File

@ -13,7 +13,7 @@ using Microsoft.Extensions.Caching.Memory;
namespace AsbCloudInfrastructure.Repository
{
#nullable enable
public class UserRepository : IUserRepository
{
private readonly IAsbCloudDbContext dbContext;
@ -284,5 +284,5 @@ namespace AsbCloudInfrastructure.Repository
return dto;
}
}
#nullable disable
}

View File

@ -15,7 +15,7 @@ using System.Threading.Tasks;
namespace AsbCloudInfrastructure.Repository
{
#nullable enable
public class UserRoleRepository : IUserRoleRepository
{
private readonly IAsbCloudDbContext dbContext;
@ -295,5 +295,5 @@ namespace AsbCloudInfrastructure.Repository
return entity;
}
}
#nullable disable
}

View File

@ -13,7 +13,7 @@ using System.Threading.Tasks;
namespace AsbCloudInfrastructure.Repository
{
#nullable enable
public class WellCompositeRepository : IWellCompositeRepository
{
private readonly IAsbCloudDbContext db;
@ -75,5 +75,5 @@ namespace AsbCloudInfrastructure.Repository
return dto;
}
}
#nullable disable
}

View File

@ -14,7 +14,7 @@ using System.Threading.Tasks;
namespace AsbCloudInfrastructure.Repository
{
#nullable enable
public class WellFinalDocumentsRepository : IWellFinalDocumentsRepository
{
private readonly IAsbCloudDbContext context;
@ -139,5 +139,5 @@ namespace AsbCloudInfrastructure.Repository
private static WellFinalDocumentDBDto Convert(WellFinalDocument entity)
=> entity.Adapt<WellFinalDocumentDBDto>();
}
#nullable disable
}

View File

@ -15,7 +15,7 @@ using System.Threading.Tasks;
namespace AsbCloudInfrastructure.Repository
{
#nullable enable
/// <summary>
/// репозиторий операций по скважине
/// </summary>
@ -399,5 +399,5 @@ namespace AsbCloudInfrastructure.Repository
return result;
}
}
#nullable disable
}

View File

@ -10,7 +10,7 @@ using System.Threading.Tasks;
namespace AsbCloudInfrastructure.Repository
{
#nullable enable
public class WitsRecordRepository<TDto, TEntity> : IWitsRecordRepository<TDto>
where TEntity : AsbCloudDb.Model.WITS.RecordBase, ITelemetryData
where TDto : AsbCloudApp.Data.ITelemetryData
@ -146,5 +146,5 @@ namespace AsbCloudInfrastructure.Repository
}
}
#nullable disable
}

View File

@ -15,7 +15,7 @@ using System.Text;
using System.Threading;
using System.Threading.Tasks;
#nullable enable
namespace AsbCloudInfrastructure.Services
{
/// <inheritdoc/>
@ -256,4 +256,3 @@ namespace AsbCloudInfrastructure.Services
}
}
}
#nullable disable

View File

@ -2,12 +2,12 @@
namespace AsbCloudInfrastructure.Services.DailyReport
{
#nullable enable
abstract class BlockAbstract
{
public abstract CellAddress AddressBlockBegin { get; }
public abstract CellAddress AddressBlockEnd { get; }
public abstract void Draw(IXLWorksheet sheet);
}
#nullable disable
}

View File

@ -5,7 +5,7 @@ using System.Text;
namespace AsbCloudInfrastructure.Services.DailyReport
{
#nullable enable
internal class CellAddress: IXLAddress
{
const int excelLettersCount = 'Z' - 'A' + 1;
@ -170,5 +170,5 @@ namespace AsbCloudInfrastructure.Services.DailyReport
return false;
}
}
#nullable disable
}

View File

@ -3,7 +3,7 @@ using ClosedXML.Excel;
namespace AsbCloudInfrastructure.Services.DailyReport.DailyReportBlocks
{
#nullable enable
class BhaBlock : BlockAbstract
{
private readonly BhaDto blockDto;
@ -111,7 +111,7 @@ namespace AsbCloudInfrastructure.Services.DailyReport.DailyReportBlocks
.SetFormulaA1($"{FormulaBhaBlock(AddressDurationDataStart[4], AddressDurationDataFinish[4])}").Style.SetAllBorders();
}
}
#nullable disable
}

View File

@ -3,7 +3,7 @@ using ClosedXML.Excel;
namespace AsbCloudInfrastructure.Services.DailyReport.DailyReportBlocks
{
#nullable enable
internal class DimensionlessBlock : BlockAbstract
{
private readonly NoDrillingDto blockDto;
@ -114,6 +114,6 @@ namespace AsbCloudInfrastructure.Services.DailyReport.DailyReportBlocks
._SetValue("Наращивание");
}
}
#nullable disable
}

View File

@ -3,7 +3,7 @@ using ClosedXML.Excel;
namespace AsbCloudInfrastructure.Services.DailyReport.DailyReportBlocks
{
#nullable enable
class HeadBlock : BlockAbstract
{
private readonly HeadDto blockDto;
@ -175,7 +175,7 @@ namespace AsbCloudInfrastructure.Services.DailyReport.DailyReportBlocks
._SetValue($"{blockDto.CountLaunchesMSE}");
}
}
#nullable disable
}

View File

@ -3,7 +3,7 @@ using ClosedXML.Excel;
namespace AsbCloudInfrastructure.Services.DailyReport.DailyReportBlocks
{
#nullable enable
internal class SaubBlock : BlockAbstract
{
private readonly SaubDto blockDto;
@ -225,6 +225,6 @@ namespace AsbCloudInfrastructure.Services.DailyReport.DailyReportBlocks
._SetValue($"Примечание: {blockDto.DeclinesReasonsROP}");
}
}
#nullable disable
}

View File

@ -3,7 +3,7 @@ using ClosedXML.Excel;
namespace AsbCloudInfrastructure.Services.DailyReport.DailyReportBlocks
{
#nullable enable
internal class SignBlock : BlockAbstract
{
private readonly SignDto blockDto;
@ -45,7 +45,7 @@ namespace AsbCloudInfrastructure.Services.DailyReport.DailyReportBlocks
.SetValue($"{blockDto.Supervisor}");
}
}
#nullable disable
}

View File

@ -5,7 +5,7 @@ using System;
using System.Collections.Generic;
using System.Linq;
#nullable enable
namespace AsbCloudInfrastructure.Services.DailyReport.DailyReportBlocks
{
/// <summary>
@ -90,4 +90,4 @@ namespace AsbCloudInfrastructure.Services.DailyReport.DailyReportBlocks
}
}
}
#nullable disable

View File

@ -6,7 +6,7 @@ using System.Collections.Generic;
using System.IO;
namespace AsbCloudInfrastructure.Services.DailyReport
{
#nullable enable
public class DailyReportMakerExcel
{
private IEnumerable<WellOperationCategoryDto> OperationCategories = null!;
@ -56,6 +56,6 @@ namespace AsbCloudInfrastructure.Services.DailyReport
sheet.Rows().AdjustToContents();
}
}
#nullable disable
}

View File

@ -17,7 +17,7 @@ using System.Threading.Tasks;
namespace AsbCloudInfrastructure.Services.DailyReport
{
#nullable enable
public class DailyReportService : IDailyReportService
{
private readonly IAsbCloudDbContext db;
@ -244,5 +244,5 @@ namespace AsbCloudInfrastructure.Services.DailyReport
};
}
}
#nullable disable
}

View File

@ -3,7 +3,7 @@ using System;
namespace AsbCloudInfrastructure.Services.DailyReport
{
#nullable enable
internal static class XLExtentions
{
public static IXLRange _SetValue(this IXLRange range, object value)
@ -157,5 +157,5 @@ namespace AsbCloudInfrastructure.Services.DailyReport
=> sheet.Range(begin.RowNumber, begin.ColumnNumber, end.RowNumber, end.ColumnNumber);
}
#nullable disable
}

View File

@ -2,7 +2,7 @@
namespace AsbCloudInfrastructure.Services.DetectOperations
{
#nullable enable
public class DetectableTelemetry
{
public DateTimeOffset DateTime { get; set; }
@ -14,5 +14,5 @@ namespace AsbCloudInfrastructure.Services.DetectOperations
public float BitDepth { get; set; }
public float RotorSpeed { get; set; }
}
#nullable disable
}

View File

@ -12,7 +12,7 @@ using System.Threading.Tasks;
namespace AsbCloudInfrastructure.Services.DetectOperations
{
#nullable enable
internal class DetectedOperationExportService
{
private readonly IAsbCloudDbContext db;
@ -116,5 +116,5 @@ namespace AsbCloudInfrastructure.Services.DetectOperations
sheet.Cell(rowNumber, 6).Value = operation.Value;
}
}
#nullable enable
}

View File

@ -15,7 +15,7 @@ using System.Threading.Tasks;
namespace AsbCloudInfrastructure.Services.DetectOperations
{
#nullable enable
public class DetectedOperationService : IDetectedOperationService
{
private readonly IAsbCloudDbContext db;
@ -310,5 +310,5 @@ namespace AsbCloudInfrastructure.Services.DetectOperations
}
}
#nullable disable
}

View File

@ -4,7 +4,7 @@ using System.Linq;
namespace AsbCloudInfrastructure.Services.DetectOperations.Detectors
{
#nullable enable
internal abstract class DetectorAbstract
{
private readonly int idOperation;
@ -343,6 +343,6 @@ namespace AsbCloudInfrastructure.Services.DetectOperations.Detectors
}
}
#nullable disable
}

View File

@ -2,7 +2,7 @@
namespace AsbCloudInfrastructure.Services.DetectOperations.Detectors
{
#nullable enable
/// <summary>
/// Проработка перед наращиванием
/// </summary>
@ -62,6 +62,6 @@ namespace AsbCloudInfrastructure.Services.DetectOperations.Detectors
=> IsValidByWellDepthDoesNotChange(telemetry, begin, end);
}
#nullable disable
}

View File

@ -2,7 +2,7 @@
namespace AsbCloudInfrastructure.Services.DetectOperations.Detectors
{
#nullable enable
/// <summary>
/// Промывка
/// </summary>
@ -54,6 +54,6 @@ namespace AsbCloudInfrastructure.Services.DetectOperations.Detectors
=> IsValidByWellDepthDoesNotChange(telemetry, begin, end);
}
#nullable disable
}

View File

@ -2,7 +2,7 @@
namespace AsbCloudInfrastructure.Services.DetectOperations.Detectors
{
#nullable enable
/// <summary>
/// Промывка перед наращиванием
/// </summary>
@ -50,6 +50,6 @@ namespace AsbCloudInfrastructure.Services.DetectOperations.Detectors
=> IsValidByWellDepthDoesNotChange(telemetry, begin, end);
}
#nullable disable
}

View File

@ -3,7 +3,7 @@ using System.Linq;
namespace AsbCloudInfrastructure.Services.DetectOperations.Detectors
{
#nullable enable
internal class DetectorRotor : DetectorAbstract
{
public DetectorRotor()
@ -57,6 +57,6 @@ namespace AsbCloudInfrastructure.Services.DetectOperations.Detectors
=> CalcRop(telemetry, begin, end);
}
#nullable disable
}

View File

@ -2,7 +2,7 @@
namespace AsbCloudInfrastructure.Services.DetectOperations.Detectors
{
#nullable enable
internal class DetectorSlide : DetectorAbstract
{
public DetectorSlide()
@ -56,6 +56,6 @@ namespace AsbCloudInfrastructure.Services.DetectOperations.Detectors
=> CalcRop(telemetry, begin, end);
}
#nullable disable
}

View File

@ -2,7 +2,7 @@
namespace AsbCloudInfrastructure.Services.DetectOperations.Detectors
{
#nullable enable
internal class DetectorSlipsTime : DetectorAbstract
{
public DetectorSlipsTime()
@ -35,6 +35,6 @@ namespace AsbCloudInfrastructure.Services.DetectOperations.Detectors
=> IsValidByWellDepthDoesNotChange(telemetry, begin, end);
}
#nullable disable
}

View File

@ -4,7 +4,7 @@ using System;
namespace AsbCloudInfrastructure.Services.DetectOperations.Detectors
{
#nullable enable
/// <summary>
/// Статический замер телесистемы
@ -64,6 +64,6 @@ namespace AsbCloudInfrastructure.Services.DetectOperations.Detectors
=> CalcDeltaMinutes(telemetry, begin, end);
}
#nullable disable
}

View File

@ -3,7 +3,7 @@ using System.Collections.Generic;
namespace AsbCloudInfrastructure.Services.DetectOperations.Detectors
{
#nullable enable
internal class DetectorTemplating : DetectorAbstract
{
public DetectorTemplating()
@ -60,6 +60,6 @@ namespace AsbCloudInfrastructure.Services.DetectOperations.Detectors
=> IsValidByWellDepthDoesNotChange(telemetry, begin, end);
}
#nullable disable
}

View File

@ -2,7 +2,7 @@
namespace AsbCloudInfrastructure.Services.DetectOperations.Detectors
{
#nullable enable
/// <summary>
/// Шаблонировка при бурении
/// </summary>
@ -56,6 +56,6 @@ namespace AsbCloudInfrastructure.Services.DetectOperations.Detectors
=> IsValidByWellDepthDoesNotChange(telemetry, begin, end);
}
#nullable disable
}

View File

@ -2,12 +2,12 @@
namespace AsbCloudInfrastructure.Services.DetectOperations.Detectors
{
#nullable enable
class OperationDetectorResult
{
public int TelemetryBegin { get; set; }
public int TelemetryEnd { get; set; }
public DetectedOperation Operation { get; set; } = null!;
}
#nullable enable
}

View File

@ -2,7 +2,7 @@
namespace AsbCloudInfrastructure.Services.DetectOperations
{
#nullable enable
public class InterpolationLine
{
private readonly double xSum;
@ -53,5 +53,5 @@ namespace AsbCloudInfrastructure.Services.DetectOperations
public bool IsAverageYGreaterThan(double bound) =>
(ySum / count) >= bound;
}
#nullable disable
}

View File

@ -12,7 +12,7 @@ using Microsoft.Extensions.DependencyInjection;
namespace AsbCloudInfrastructure.Services.DetectOperations
{
#nullable enable
public static class OperationDetectionWorkFactory
{
private const string workId = "Operation detection";
@ -159,5 +159,5 @@ namespace AsbCloudInfrastructure.Services.DetectOperations
return detectedOperations;
}
}
#nullable disable
}

View File

@ -6,7 +6,7 @@ using System.Linq;
namespace AsbCloudInfrastructure.Services.DrillingProgram
{
#nullable enable
public class ContentListSheet
{
private readonly List<DrillingProgramPartDto> parts;
@ -37,5 +37,5 @@ namespace AsbCloudInfrastructure.Services.DrillingProgram
}
}
}
#nullable disable
}

View File

@ -10,7 +10,7 @@ using iText.Kernel.Utils;
namespace AsbCloudInfrastructure.Services.DrillingProgram.Convert
{
#nullable enable
sealed internal class ConvertToPdf
{
internal static readonly string[] filesExtensions = { ".xlsx", ".xls", ".ods", ".odt", ".doc", ".docx", ".pdf" };
@ -85,5 +85,5 @@ namespace AsbCloudInfrastructure.Services.DrillingProgram.Convert
Directory.Delete(Path.Combine(convertedFilesDir, "pdf"), true);
}
}
#nullable disable
}

View File

@ -6,7 +6,7 @@ using System.Linq;
namespace AsbCloudInfrastructure.Services.DrillingProgram
{
#nullable enable
internal class DrillingProgramMaker
{
private const int maxAllowedColumns = 256;
@ -129,5 +129,5 @@ namespace AsbCloudInfrastructure.Services.DrillingProgram
return rngData;
}
}
#nullable disable
}

View File

@ -552,5 +552,5 @@ namespace AsbCloudInfrastructure.Services.DrillingProgram
private static string MakeWorkId(int idWell)
=> $"Make drilling program for wellId {idWell}";
}
#nullable disable
}

View File

@ -2,7 +2,7 @@
namespace AsbCloudInfrastructure.Services.DrillingProgram
{
#nullable enable
class ImageInfo
{
public int Id { get; set; }
@ -13,5 +13,5 @@ namespace AsbCloudInfrastructure.Services.DrillingProgram
public int Left { get; set; }
public int Top { get; set; }
}
#nullable disable
}

View File

@ -6,7 +6,7 @@ using System.Linq;
namespace AsbCloudInfrastructure.Services.DrillingProgram
{
#nullable enable
public class TitleListSheet
{
private const string directionDirectorPositionName = "Руководитель направления по ТСБ";
@ -160,5 +160,5 @@ namespace AsbCloudInfrastructure.Services.DrillingProgram
private static string FormatDate(DateTime dateTime)
=> $"{dateTime.Day:00}.{dateTime.Month:00}.{dateTime.Year:00}";
}
#nullable disable
}

View File

@ -6,7 +6,7 @@ using System.IO;
namespace AsbCloudInfrastructure.Services.Email
{
#nullable enable
public class BaseFactory
{
private readonly string platformName;
@ -61,5 +61,5 @@ namespace AsbCloudInfrastructure.Services.Email
public virtual string MakeSubject(WellDto well, string action)
=> $"{well.Deposit}, {well.Cluster}, {well.Caption}. {action}";
}
#nullable disable
}

View File

@ -6,7 +6,7 @@ using System.IO;
namespace AsbCloudInfrastructure
{
#nullable enable
class DrillingMailBodyFactory : BaseFactory
{
private readonly string platformName;
@ -85,5 +85,5 @@ namespace AsbCloudInfrastructure
return drillingProgramHref;
}
}
#nullable disable
}

View File

@ -12,7 +12,7 @@ using AsbCloudInfrastructure.Background;
namespace AsbCloudInfrastructure.Services
{
#nullable enable
public class EmailService : IEmailService
{
private readonly BackgroundWorker backgroundWorker;
@ -117,5 +117,5 @@ namespace AsbCloudInfrastructure.Services
return hash;
}
}
#nullable disable
}

View File

@ -6,7 +6,7 @@ using System.IO;
namespace AsbCloudInfrastructure
{
#nullable enable
class WellFinalDocumentMailBodyFactory : BaseFactory
{
private readonly string platformName;
@ -30,5 +30,5 @@ namespace AsbCloudInfrastructure
return body;
}
}
#nullable disable
}

View File

@ -10,7 +10,7 @@ using System.Threading.Tasks;
namespace AsbCloudInfrastructure.Services
{
#nullable enable
public class FileCategoryService : CrudCacheRepositoryBase<FileCategoryDto, FileCategory>, IFileCategoryService
{
public FileCategoryService(IAsbCloudDbContext context, IMemoryCache memoryCache)
@ -29,5 +29,5 @@ namespace AsbCloudInfrastructure.Services
return dtos;
}
}
#nullable disable
}

View File

@ -12,7 +12,7 @@ using Microsoft.Extensions.DependencyInjection;
namespace AsbCloudInfrastructure.Services
{
#nullable enable
internal static class LimitingParameterCalcWorkFactory
{
private const string workId = "Limiting parameter calc";
@ -147,5 +147,5 @@ namespace AsbCloudInfrastructure.Services
return result;
}
}
#nullable disable
}

View File

@ -10,7 +10,7 @@ using System.Threading.Tasks;
namespace AsbCloudInfrastructure.Services
{
#nullable enable
public class LimitingParameterService : ILimitingParameterService
{
private readonly ILimitingParameterRepository limitingParameterRepository;
@ -115,5 +115,5 @@ namespace AsbCloudInfrastructure.Services
return result;
}
}
#nullable disable
}

View File

@ -13,7 +13,7 @@ using System.Threading.Tasks;
namespace AsbCloudInfrastructure.Services
{
#nullable enable
public class MeasureService : IMeasureService
{
private readonly IAsbCloudDbContext db;
@ -158,5 +158,5 @@ namespace AsbCloudInfrastructure.Services
return entity;
}
}
#nullable disable
}

View File

@ -9,7 +9,7 @@ using System.Threading.Tasks;
namespace AsbCloudInfrastructure.Services.ProcessMap
{
#nullable enable
public class ProcessMapReportMakerService : IProcessMapReportMakerService
{
const int firstColumn = 2;
@ -205,5 +205,5 @@ namespace AsbCloudInfrastructure.Services.ProcessMap
return style;
}
}
#nullable disable
}

View File

@ -11,7 +11,7 @@ using System.Threading.Tasks;
namespace AsbCloudInfrastructure.Services.ProcessMap
{
#nullable enable
public partial class ProcessMapReportService : IProcessMapReportService
{
private readonly IWellService wellService;
@ -389,5 +389,5 @@ namespace AsbCloudInfrastructure.Services.ProcessMap
_ => "Ручной",
};
}
#nullable disable
}

View File

@ -5,7 +5,7 @@ namespace AsbCloudInfrastructure.Services.ProcessMap;
internal static class XLExtentions
{
#nullable enable
public static IXLCell SetVal(this IXLCell cell, string value, bool adaptRowHeight = false)
{
cell.Value = value;
@ -48,5 +48,5 @@ internal static class XLExtentions
cell.Style.NumberFormat.Format = format;
return cell;
}
#nullable disable
}

View File

@ -13,7 +13,7 @@ using System.Threading.Tasks;
namespace AsbCloudInfrastructure.Services
{
#nullable enable
class JobHandle
{
public int Id => Job.Id;
@ -331,5 +331,5 @@ namespace AsbCloudInfrastructure.Services
return new AsbCloudDbContext(options);
}
}
#nullable disable
}

View File

@ -15,7 +15,7 @@ using System.Threading.Tasks;
namespace AsbCloudInfrastructure.Services
{
#nullable enable
public class ReportService : IReportService
{
private readonly IAsbCloudDbContext db;
@ -177,5 +177,5 @@ namespace AsbCloudInfrastructure.Services
return generator;
}
}
#nullable disable
}

View File

@ -7,7 +7,7 @@ using System.Linq;
namespace AsbCloudInfrastructure.Services
{
#nullable enable
public class RequestTrackerService : IRequerstTrackerService
{
const int fastRequestsCount = 1000;
@ -128,5 +128,5 @@ namespace AsbCloudInfrastructure.Services
}
}
}
#nullable disable
}

View File

@ -6,7 +6,7 @@ using System.Text.RegularExpressions;
namespace System.Text.Csv
{
#nullable enable
public class CsvSerializer<T>
{
private readonly PropertyInfo[] props;
@ -80,5 +80,5 @@ namespace System.Text.Csv
return $"\"{inString}\"";
}
}
#nullable disable
}

View File

@ -10,7 +10,7 @@ using System.Threading.Tasks;
namespace AsbCloudInfrastructure.Services.SAUB
{
#nullable enable
public class EventService : IEventService
{
private readonly IAsbCloudDbContext db;
@ -43,5 +43,5 @@ namespace AsbCloudInfrastructure.Services.SAUB
memoryCache.DropBasic<TelemetryEvent>();
}
}
#nullable disable
}

View File

@ -13,7 +13,7 @@ using System.Linq;
using System.Threading;
using System.Threading.Tasks;
#nullable enable
namespace AsbCloudInfrastructure.Services.SAUB
{
public class MessageService : IMessageService
@ -155,4 +155,4 @@ namespace AsbCloudInfrastructure.Services.SAUB
}
}
}
#nullable disable

View File

@ -12,7 +12,7 @@ using System.Threading.Tasks;
namespace AsbCloudInfrastructure.Services.SAUB
{
#nullable enable
public class SetpointsService : ISetpointsService
{
// ## Инфо от АПГ от 26.11.2021, дополнения ШОВ от 26.11.2021
@ -113,5 +113,5 @@ namespace AsbCloudInfrastructure.Services.SAUB
public IEnumerable<SetpointInfoDto> GetSetpointsNames()
=> SetpointInfos.Values;
}
#nullable disable
}

View File

@ -9,7 +9,7 @@ using System.Linq;
using System.Threading;
using System.Threading.Tasks;
#nullable enable
namespace AsbCloudInfrastructure.Services.SAUB
{
public abstract class TelemetryDataBaseService<TDto, TEntity> : ITelemetryDataService<TDto>
@ -158,4 +158,3 @@ namespace AsbCloudInfrastructure.Services.SAUB
}
}
#nullable disable

View File

@ -8,7 +8,7 @@ using Mapster;
using System.Threading.Tasks;
using Microsoft.Extensions.Configuration;
#nullable enable
namespace AsbCloudInfrastructure.Services.SAUB
{
public class TelemetryDataCache<TDto>
@ -182,4 +182,3 @@ namespace AsbCloudInfrastructure.Services.SAUB
}
}
}
#nullable disable

View File

@ -17,7 +17,7 @@ using System.Threading.Tasks;
namespace AsbCloudInfrastructure.Services.SAUB
{
#nullable enable
public class TelemetryDataSaubService : TelemetryDataBaseService<TelemetryDataSaubDto, TelemetryDataSaub>, ITelemetryDataSaubService
{
private readonly ITelemetryUserService telemetryUserService;
@ -145,5 +145,5 @@ namespace AsbCloudInfrastructure.Services.SAUB
return outStream;
}
}
#nullable disable
}

View File

@ -5,7 +5,7 @@ using Mapster;
namespace AsbCloudInfrastructure.Services.SAUB
{
#nullable enable
public class TelemetryDataSpinService : TelemetryDataBaseService<TelemetryDataSpinDto, TelemetryDataSpin>
{
public TelemetryDataSpinService(
@ -29,5 +29,5 @@ namespace AsbCloudInfrastructure.Services.SAUB
return dto;
}
}
#nullable disable
}

View File

@ -14,7 +14,7 @@ using System.Threading.Tasks;
namespace AsbCloudInfrastructure.Services.SAUB
{
#nullable enable
public class TelemetryService : ITelemetryService
{
private readonly IAsbCloudDbContext db;
@ -343,5 +343,5 @@ namespace AsbCloudInfrastructure.Services.SAUB
return affected;
}
}
#nullable disable
}

View File

@ -12,7 +12,7 @@ using System.Threading.Tasks;
namespace AsbCloudInfrastructure.Services.SAUB
{
#nullable enable
public class TelemetryTracker : ITelemetryTracker
{
class TrackerStat
@ -152,5 +152,5 @@ namespace AsbCloudInfrastructure.Services.SAUB
public IEnumerable<string> GetTransmittingTelemetriesUids() =>
telemetriesStats.Keys;
}
#nullable disable
}

View File

@ -13,7 +13,7 @@ using System.Threading.Tasks;
namespace AsbCloudInfrastructure.Services.SAUB
{
#nullable enable
public class TelemetryUserService : ITelemetryUserService
{
private const string CacheTag = "TelemetryUserCacheTag";
@ -97,5 +97,5 @@ namespace AsbCloudInfrastructure.Services.SAUB
return dto;
}
}
#nullable disable
}

View File

@ -3,7 +3,7 @@ using System.Collections.Generic;
namespace AsbCloudInfrastructure.Services.Subsystems.Utils
{
#nullable enable
internal class DepthInterpolation
{
private readonly TimeSpan maxDeltaDate = TimeSpan.FromHours(12);
@ -58,5 +58,5 @@ namespace AsbCloudInfrastructure.Services.Subsystems.Utils
return (float)y;
}
}
#nullable disable
}

View File

@ -15,7 +15,7 @@ using System.Threading.Tasks;
namespace AsbCloudInfrastructure.Services.Subsystems
{
#nullable enable
internal static class SubsystemOperationTimeCalcWorkFactory
{
private const string workId = "Subsystem operation time calc";
@ -340,5 +340,5 @@ namespace AsbCloudInfrastructure.Services.Subsystems
return depthInterpolation;
}
}
#nullable disable
}

View File

@ -17,7 +17,7 @@ using System.Threading.Tasks;
namespace AsbCloudInfrastructure.Services.Subsystems
{
#nullable enable
internal class SubsystemOperationTimeService : ISubsystemOperationTimeService
{
@ -351,5 +351,5 @@ namespace AsbCloudInfrastructure.Services.Subsystems
}
#nullable disable
}

View File

@ -14,7 +14,7 @@ using System.Threading.Tasks;
namespace AsbCloudInfrastructure.Services.Subsystems
{
#nullable enable
internal class SubsystemService : CrudCacheRepositoryBase<SubsystemDto, Subsystem>, ISubsystemService
{
private readonly IWellService wellService;
@ -50,5 +50,5 @@ namespace AsbCloudInfrastructure.Services.Subsystems
return subsystem;
}
}
#nullable disable
}

View File

@ -11,7 +11,7 @@ using System.Threading.Tasks;
namespace AsbCloudInfrastructure.Services.Trajectory
{
#nullable enable
public class PlannedTrajectoryImportService : IPlannedTrajectoryImportService
{
/*
@ -233,6 +233,6 @@ namespace AsbCloudInfrastructure.Services.Trajectory
return trajectoryRow;
}
}
#nullable disable
}

View File

@ -9,7 +9,7 @@ using System.Threading.Tasks;
namespace AsbCloudInfrastructure.Services.Trajectory
{
#nullable enable
public class TrajectoryVisualizationService : ITrajectoryVisualizationService
{
private readonly IPlannedTrajectoryRepository repository;
@ -54,5 +54,5 @@ namespace AsbCloudInfrastructure.Services.Trajectory
return cartesianCoordinates;
}
}
#nullable disable
}

View File

@ -12,7 +12,7 @@ using System.Threading.Tasks;
namespace AsbCloudInfrastructure.Services
{
#nullable enable
/// <summary>
/// Сервис "Дело скважины"
/// </summary>
@ -151,5 +151,5 @@ namespace AsbCloudInfrastructure.Services
}
}
#nullable disable
}

View File

@ -17,7 +17,7 @@ using System.Threading.Tasks;
namespace AsbCloudInfrastructure.Services
{
#nullable enable
public class WellInfoService
{
class WellMapInfoWithComanies : WellMapInfoDto
@ -149,5 +149,5 @@ namespace AsbCloudInfrastructure.Services
public static WellMapInfoDto? FirstOrDefault(Func<WellMapInfoDto, bool> predicate)
=> WellMapInfo.FirstOrDefault(predicate);
}
#nullable disable
}

View File

@ -12,7 +12,7 @@ using System.Threading.Tasks;
namespace AsbCloudInfrastructure.Services.WellOperationService
{
#nullable enable
public class OperationsStatService : IOperationsStatService
{
private readonly IAsbCloudDbContext db;
@ -540,5 +540,5 @@ namespace AsbCloudInfrastructure.Services.WellOperationService
return destination;
}
}
#nullable disable
}

Some files were not shown because too many files have changed in this diff Show More