This commit is contained in:
ai.astrakhantsev 2023-02-24 14:41:24 +05:00
commit aceefe637a
13 changed files with 19 additions and 31 deletions

View File

@ -25,12 +25,8 @@ namespace AsbCloudApp.Comparators
/// <param name="y"></param>
/// <returns></returns>
public int Compare(IId? x, IId? y)
{
if (x is null || y is null)
return 0;
else
return x.Id.CompareTo(y.Id);
}
=> (x?.Id??0).CompareTo(y?.Id??0);
/// <summary>
///
@ -39,11 +35,11 @@ namespace AsbCloudApp.Comparators
/// <param name="y"></param>
/// <returns></returns>
public bool Equals(IId? x, IId? y)
{
if (x is null || y is null)
return false;
else
{
if (x is not null && y is not null)
return x.Id == y.Id;
return x == y;
}
/// <summary>

View File

@ -9,12 +9,10 @@ namespace AsbCloudApp.Comparators
/// <inheritdoc/>
public bool Equals(TelemetryUserDto? prevUser, TelemetryUserDto? nextUser)
{
if (prevUser is null || nextUser is null)
return false;
else if (prevUser.Id == nextUser.Id)
return true;
else
return false;
if (prevUser is not null && nextUser is not null)
return prevUser.Id == nextUser.Id;
return prevUser == nextUser;
}
/// <inheritdoc/>

View File

@ -11,7 +11,7 @@
/// <summary>
/// Название
/// </summary>
public string Caption { get; set; } = string.Empty;
public string Caption { get; set; } = null!;
/// <inheritdoc/>
public double? Latitude { get; set; }

View File

@ -28,7 +28,7 @@ namespace AsbCloudApp.Data
/// <summary>
/// пользователь панели оператора
/// </summary>
public string User { get; set; } = null!;
public string? User { get; set; }
/// <summary>
/// текст сообщения

View File

@ -13,7 +13,7 @@
/// <summary>
/// название текущей операции генерации
/// </summary>
public string Operation { get; set; } = string.Empty;
public string? Operation { get; set; }
/// <summary>
/// номер текущей страницы

View File

@ -2,7 +2,6 @@
namespace AsbCloudApp.Data
{
#nullable enable
/// <summary>
/// DTO формирования рапорта
/// </summary>

View File

@ -2,7 +2,6 @@
namespace AsbCloudApp.Data
{
#nullable enable
/// <summary>
/// DTO журнала запросов
/// </summary>
@ -63,5 +62,4 @@ namespace AsbCloudApp.Data
/// </summary>
public string? ExceptionStack { get; set; } = null!;
}
#nullable disable
}

View File

@ -2,7 +2,6 @@
namespace AsbCloudApp.Data
{
#nullable enable
/// <summary>
/// DTO статистики запросов по пользователю
/// </summary>
@ -48,5 +47,4 @@ namespace AsbCloudApp.Data
/// </summary>
public UserDto User { get; set; } = null!;
}
#nullable disable
}

View File

@ -41,6 +41,6 @@ namespace AsbCloudApp.Data
/// <summary>
/// Бурильщик
/// </summary>
public DrillerDto Driller { get; set; } = null!;
public DrillerDto? Driller { get; set; }
}
}

View File

@ -1,6 +1,5 @@
namespace AsbCloudApp.Data
{
#nullable enable
/// <summary>
/// âðåìåííàÿ çîíà
/// </summary>

View File

@ -45,7 +45,7 @@ namespace AsbCloudApp.Data
/// <summary>
/// статистика за всю скважину
/// </summary>
public PlanFactBase<StatOperationsDto>? Total { get; set; }
public PlanFactBase<StatOperationsDto> Total { get; set; } = new();
/// <summary>
/// компании участвующие в строительстве скважины

View File

@ -34,6 +34,6 @@ namespace AsbCloudApp.Data
/// <summary>
/// DTO скважины
/// </summary>
public WellInfoDto Well { get; set; } = null!;
public WellInfoDto? Well { get; set; }
}
}

View File

@ -118,11 +118,11 @@ namespace AsbCloudApp.Data
public static bool operator >(TimeDto a, TimeDto b) => a.TotalSeconds > b.TotalSeconds;
/// <inheritdoc/>
public int CompareTo(TimeDto other)
=> TotalSeconds - other.TotalSeconds;
public int CompareTo(TimeDto? other)
=> TotalSeconds - other?.TotalSeconds??0;
/// <inheritdoc/>
public override bool Equals(object obj)
public override bool Equals(object? obj)
{
if (ReferenceEquals(this, obj))
{