Code development platform for open source projects from the European Union institutions

Skip to content
Snippets Groups Projects
Commit bdca670d authored by Michael KRISPER's avatar Michael KRISPER
Browse files

VehicleContainer: Added some compiler directives for hiding debug output.

parent a70c6904
No related branches found
No related tags found
No related merge requests found
......@@ -208,31 +208,35 @@ namespace TUGraz.VectoCore.Models.Simulation.Impl
}
} else {
foreach (var (_, c) in _components) {
#if DEBUG
var found = false;
#endif
if (c is IUpdateable target) {
foreach (var (_, source) in (realContainer as VehicleContainer)._components) {
if (target.UpdateFrom(source)) {
ComponentUpdateList.Add((target, source));
#if DEBUG
found = true;
#endif
}
}
}
#if DEBUG
#if DEBUG
if (!found) {
Console.WriteLine("Test Component is not updateable: " + c.GetType());
}
#endif
#endif
}
#if DEBUG
#if DEBUG
var sourceList = ComponentUpdateList.Select(st => st.Item2).ToArray();
foreach (var (_, source) in (realContainer as VehicleContainer)._components) {
if (!sourceList.Contains(source)){
Console.WriteLine("Real Component is not used for update: " + source.GetType());
}
}
#endif
#endif
ComponentUpdateList = ComponentUpdateList.Distinct().ToList();
}
......@@ -281,7 +285,7 @@ namespace TUGraz.VectoCore.Models.Simulation.Impl
public virtual VectoRun.Status RunStatus { get; set; }
#endregion
#endregion
public IReadOnlyCollection<VectoSimulationComponent> SimulationComponents()
{
......@@ -322,22 +326,22 @@ namespace TUGraz.VectoCore.Models.Simulation.Impl
_gearboxInfo = new EngineOnlyGearboxInfo(this);
}
#region Overrides of VehicleContainer
#region Overrides of VehicleContainer
public override IMileageCounter MileageCounter => _mileageCounter;
#endregion
#endregion
#region Overrides of VehicleContainer
#region Overrides of VehicleContainer
public override IVehicleInfo VehicleInfo => _vehicleInfo;
#endregion
#endregion
#region Overrides of VehicleContainer
#region Overrides of VehicleContainer
public override IGearboxInfo GearboxInfo => _gearboxInfo;
#endregion
#endregion
}
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment