diff --git a/AsbCloudInfrastructure/Services/WellOperationsStatService.cs b/AsbCloudInfrastructure/Services/WellOperationsStatService.cs index 884674fd..41b67ae8 100644 --- a/AsbCloudInfrastructure/Services/WellOperationsStatService.cs +++ b/AsbCloudInfrastructure/Services/WellOperationsStatService.cs @@ -49,7 +49,7 @@ namespace AsbCloudInfrastructure.Services public double DeltaHoursTimeNoNpt => (EndDate - StartDate).TotalHours - NonProductiveHours; public double Speed => DeltaDepth / (DeltaHoursTimeNoNpt + double.Epsilon); - public List operations { get; internal set; } + public List Operations { get; internal set; } } public class WellOperationsStatService : IWellOperationsStatService @@ -254,7 +254,7 @@ namespace AsbCloudInfrastructure.Services { StartDate = iterator.Current.Start.AddHours(iterator.Current.Hours), StartWellDepth = iterator.Current.WellDepth, - operations = new List(4), + Operations = new List(4), }; while (iterator.MoveNext()) { @@ -269,7 +269,7 @@ namespace AsbCloudInfrastructure.Services races.Add(race); break; } - race.operations.Add(iterator.Current); + race.Operations.Add(iterator.Current); } } } @@ -295,11 +295,11 @@ namespace AsbCloudInfrastructure.Services foreach (var race in races) { dDepth += race.StartWellDepth; - for (var i = 0; i < race.operations.Count; i++) + for (var i = 0; i < race.Operations.Count; i++) { - if (race.operations[i].IdCategory == idOperationBhaDown) - dHours += race.operations[i].Hours; - if (race.operations[i].IdCategory == idOperationDrilling) + if (race.Operations[i].IdCategory == idOperationBhaDown) + dHours += race.Operations[i].Hours; + if (race.Operations[i].IdCategory == idOperationDrilling) break; } } @@ -313,11 +313,11 @@ namespace AsbCloudInfrastructure.Services foreach (var race in races) { dDepth += race.EndWellDepth; - for (var i = race.operations.Count -1; i > 0 ; i--) + for (var i = race.Operations.Count -1; i > 0 ; i--) { - if (race.operations[i].IdCategory == idOperationBhaUp) - dHours += race.operations[i].Hours; - if (race.operations[i].IdCategory == idOperationDrilling) + if (race.Operations[i].IdCategory == idOperationBhaUp) + dHours += race.Operations[i].Hours; + if (race.Operations[i].IdCategory == idOperationDrilling) break; } } @@ -383,7 +383,7 @@ namespace AsbCloudInfrastructure.Services return tvd; } - private static Action WellOperationDtoMutation = (WellOperationDto dest, WellOperation source) => + private static readonly Action WellOperationDtoMutation = (WellOperationDto dest, WellOperation source) => { dest.CategoryName = source.OperationCategory?.Name; dest.WellSectionTypeName = source.WellSectionType?.Caption;