Code clean up

This commit is contained in:
retr0volkov
2025-07-10 09:19:06 +03:00 Unverified
parent 2a8f8d2714
commit 915c7a7c5e
36 changed files with 116 additions and 133 deletions
+3 -4
View File
@@ -1,5 +1,4 @@
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using CommunityToolkit.Mvvm.ComponentModel;
@@ -43,7 +42,7 @@ public partial class EquipmentViewModel : ViewModelBase
Image = new ImageViewModel(equipment.Image ?? new Image());
Properties = new ObservableCollection<PropertyViewModel>(equipment.Properties.Select(e => new PropertyViewModel(e)));
List<DateTime[]> times = (equipment.Inspections.Select(e => new InspectionViewModel(e)))
var times = equipment.Inspections.Select(e => new InspectionViewModel(e))
.Select(e => e.GetNearestDates())
.ToList();
@@ -62,12 +61,12 @@ public partial class EquipmentViewModel : ViewModelBase
public Equipment GetEquipment()
{
return new Equipment()
return new Equipment
{
Name = Name,
Description = Description,
Image = Image?.GetImage(),
Inspections = Inspections.Select(e => e.GetInspection()).ToList(),
Inspections = Inspections.Select(e => e.GetInspection()).ToList()
};
}
}