forked from ddrilling/AsbCloudServer
fix nullable warnings
.
This commit is contained in:
parent
5de4e43ad9
commit
800cf932ca
@ -31,12 +31,12 @@
|
||||
public string SluiceFinish { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Подьем КНБК. Время начала
|
||||
/// Подъем КНБК. Время начала
|
||||
/// </summary>
|
||||
public string ClimbBegin { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Подьем КНБК. Время окончания
|
||||
/// Подъем КНБК. Время окончания
|
||||
/// </summary>
|
||||
public string ClimbFinish { get; set; }
|
||||
|
||||
|
@ -120,5 +120,30 @@ namespace AsbCloudApp.Data
|
||||
/// <inheritdoc/>
|
||||
public int CompareTo(TimeDto other)
|
||||
=> TotalSeconds - other.TotalSeconds;
|
||||
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
if (ReferenceEquals(this, obj))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
if (obj is null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (obj is TimeDto objTime)
|
||||
{
|
||||
return objTime == this;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return base.GetHashCode();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -136,12 +136,12 @@ namespace AsbCloudInfrastructure.Services.DailyReport
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
public bool Equals(IXLAddress x, IXLAddress y)
|
||||
=> x.ColumnNumber == y.ColumnNumber &&
|
||||
x.RowNumber == y.RowNumber &&
|
||||
x.FixedColumn == y.FixedColumn &&
|
||||
x.FixedRow == y.FixedRow &&
|
||||
x.Worksheet == y.Worksheet;
|
||||
public bool Equals(IXLAddress? x, IXLAddress? y)
|
||||
=> x?.ColumnNumber == y?.ColumnNumber &&
|
||||
x?.RowNumber == y?.RowNumber &&
|
||||
x?.FixedColumn == y?.FixedColumn &&
|
||||
x?.FixedRow == y?.FixedRow &&
|
||||
x?.Worksheet == y?.Worksheet;
|
||||
|
||||
public override int GetHashCode()
|
||||
=> base.GetHashCode();
|
||||
@ -149,10 +149,10 @@ namespace AsbCloudInfrastructure.Services.DailyReport
|
||||
public int GetHashCode([DisallowNull] IXLAddress obj)
|
||||
=> obj.GetHashCode();
|
||||
|
||||
public bool Equals(IXLAddress other)
|
||||
public bool Equals(IXLAddress? other)
|
||||
=> Equals(this, other);
|
||||
|
||||
public override bool Equals(object obj)
|
||||
public override bool Equals(object? obj)
|
||||
{
|
||||
if (ReferenceEquals(this, obj))
|
||||
{
|
||||
|
@ -108,7 +108,7 @@ namespace AsbCloudInfrastructure.Services.DailyReport
|
||||
|
||||
private async Task<DailyReportDto> MakeDefaultDailyReportAsync(int idWell, DateTime date, CancellationToken token)
|
||||
{
|
||||
var well = await wellService.GetAsync(idWell, token);
|
||||
var well = await wellService.GetOrDefaultAsync(idWell, token);
|
||||
var dto = new DailyReportDto()
|
||||
{
|
||||
Head = new HeadDto()
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
namespace AsbCloudInfrastructure.Services.DetectOperations.Detectors
|
||||
{
|
||||
|
||||
#nullable enable
|
||||
/// <summary>
|
||||
/// Промывка перед наращиванием
|
||||
/// </summary>
|
||||
|
Loading…
Reference in New Issue
Block a user