forked from ddrilling/AsbCloudServer
fix helper class
This commit is contained in:
parent
85ff9a5903
commit
590197d3a6
@ -13,7 +13,7 @@ namespace AsbCloudInfrastructure
|
||||
|
||||
var max = items[0];
|
||||
for (var i = 1; i < count; i++)
|
||||
if (max.CompareTo(items[i]) > 0)
|
||||
if (max.CompareTo(items[i]) < 0)
|
||||
max = items[i];
|
||||
|
||||
return max;
|
||||
@ -28,7 +28,7 @@ namespace AsbCloudInfrastructure
|
||||
|
||||
var min = items[0];
|
||||
for (var i = 1; i < count; i++)
|
||||
if (min.CompareTo(items[i]) < 0)
|
||||
if (min.CompareTo(items[i]) > 0)
|
||||
min = items[i];
|
||||
|
||||
return min;
|
||||
@ -44,9 +44,9 @@ namespace AsbCloudInfrastructure
|
||||
var min = items[0];
|
||||
var max = items[0];
|
||||
for (var i = 1; i < count; i++)
|
||||
if (max.CompareTo(items[i]) > 0)
|
||||
if (max.CompareTo(items[i]) < 0)
|
||||
max = items[i];
|
||||
else if (min.CompareTo(items[i]) < 0)
|
||||
else if (min.CompareTo(items[i]) > 0)
|
||||
min = items[i];
|
||||
|
||||
return (min, max);
|
||||
|
@ -246,6 +246,7 @@ namespace AsbCloudInfrastructure.Services
|
||||
|
||||
private static IEnumerable<OperationParams> MakeOperationsExt(IEnumerable<WellOperation> operations)
|
||||
{
|
||||
var sortedOperations = operations.OrderBy(o => o.StartDate);
|
||||
var count = operations.Count();
|
||||
var ops = new List<OperationParams>(count);
|
||||
var item = operations.ElementAt(0);
|
||||
|
Loading…
Reference in New Issue
Block a user