System.Predicate.Invoke(Vehicle)

Here are the examples of the csharp api System.Predicate.Invoke(Vehicle) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

3 Examples 7

19 Source : GearboxUtility.cs
with GNU General Public License v3.0
from uholeschak

public static void SetGearboxType(Vehicle vehicle, string gearboxType, [CallerMemberName] string caller = null)
		{
			if (!GearboxUtility.useLegacyGearboxTypeDetection(vehicle))
			{
				return;
			}
			//Log.Info("GearboxUtility.SetGearboxType()", "Gearbox type set to " + gearboxType + ". Called from: " + caller, Array.Empty<object>());
			vehicle.Getriebe = gearboxType;
		}

19 Source : GearboxUtility.cs
with GNU General Public License v3.0
from uholeschak

public static void SetAutomaticGearboxByEgsEcu(Vehicle vehicle)
		{
			if (!GearboxUtility.useLegacyGearboxTypeDetection(vehicle))
			{
				return;
			}
			if (vehicle.getECUbyECU_GRUPPE("G_EGS") != null && string.CompareOrdinal(vehicle.Getriebe, "AUT") != 0)
			{
				//Log.Info("GearboxUtility.SetAutomaticGearboxByEgsEcu()", "found EGS ecu in vehicle with recoginzed manual gearbox; will be overwritten", Array.Empty<object>());
				vehicle.Getriebe = "AUT";
			}
		}

19 Source : GearboxUtility.cs
with GNU General Public License v3.0
from uholeschak

public static void PerformGearboxreplacedignments(Vehicle vehicle)
		{
			if (!GearboxUtility.useLegacyGearboxTypeDetection(vehicle))
			{
				return;
			}
			if (!string.IsNullOrEmpty(vehicle.Ereihe) && "E65 E66 E67 E68".Contains(vehicle.Ereihe))
			{
				vehicle.Getriebe = "AUT";
				return;
			}
			if (!GearboxUtility.HasVehicleGearboxECU(vehicle) && vehicle.getECU(new long?(24L)) == null)
			{
				if (vehicle.FA != null && vehicle.FA.SA != null && vehicle.FA.SA.Count > 0 && !vehicle.FA.SA.Contains("205"))
				{
					//Log.Info("VehicleIdent.doVehicleIdent()", "gearbox set to manual, because vehicle does not contain 205 sa", Array.Empty<object>());
					vehicle.Getriebe = "MECH";
				}
				if (vehicle.ECU != null && vehicle.ECU.Count > 0 && vehicle.BNType != BNType.IBUS)
				{
					//Log.Info("VehicleIdent.doVehicleIdent()", "gearbox set to manual, because vehicle has no D_EGS or G_EGS", Array.Empty<object>());
					vehicle.Getriebe = "MECH";
				}
				return;
			}
			ECU ecu = vehicle.getECU(new long?(24L));
			if ((ecu != null || (vehicle.VehicleIdentLevel != IdentificationLevel.VINVehicleReadout && vehicle.VehicleIdentLevel != IdentificationLevel.VINVehicleReadoutOnlineUpdated)) && (ecu == null || string.IsNullOrEmpty(ecu.VARIANTE) || string.Compare(ecu.VARIANTE, 0, "DKG", 0, 3, StringComparison.OrdinalIgnoreCase) != 0) && (ecu == null || string.IsNullOrEmpty(ecu.VARIANTE) || string.Compare(ecu.VARIANTE, 0, "GSGE", 0, 4, StringComparison.OrdinalIgnoreCase) != 0) && (ecu == null || string.IsNullOrEmpty(ecu.VARIANTE) || string.Compare(ecu.VARIANTE, 0, "SMG", 0, 3, StringComparison.OrdinalIgnoreCase) != 0) && (ecu == null || string.IsNullOrEmpty(ecu.VARIANTE) || string.Compare(ecu.VARIANTE, 0, "SSG", 0, 3, StringComparison.OrdinalIgnoreCase) != 0) && (ecu == null || string.IsNullOrEmpty(ecu.VARIANTE) || string.Compare(ecu.VARIANTE, 0, "GSD", 0, 3, StringComparison.OrdinalIgnoreCase) != 0) && !vehicle.hreplacedA("2MK") && !vehicle.hreplacedA("206") && !vehicle.hreplacedA("2TC"))
			{
				if ("MECH".Equals(vehicle.Getriebe, StringComparison.OrdinalIgnoreCase))
				{
					//Log.Info("VehicleIdent.doVehicleIdent()", "found EGS ECU in vehicle with recognized manual gearbox; will be overwritten", Array.Empty<object>());
				}
				vehicle.Getriebe = "AUT";
				return;
			}
			if ("AUT".Equals(vehicle.Getriebe, StringComparison.OrdinalIgnoreCase))
			{
				//Log.Info("VehicleIdent.doVehicleIdent()", "found DKG ECU in vehicle with recognized automatic gearbox; will be overwritten", Array.Empty<object>());
			}
			vehicle.Getriebe = "MECH";
		}