public override string AreDeviceProfilesEmpty() { var areDeviceProfilesEmpty = Energyprofiles .Where(deviceEnergyProfileTuple => deviceEnergyProfileTuple.TimeProfile.TimeSpanDataPoints.Count < 2) .Select(deviceEnergyProfileTuple => deviceEnergyProfileTuple.TimeProfile.Name).FirstOrDefault(); return(areDeviceProfilesEmpty); }
public void AddDeviceTuple([NotNull] CalcDevice dev, [NotNull] CalcProfile newprof, [NotNull] CalcLoadType lt, decimal timeoffset, TimeSpan internalstepsize, double multiplier, double probability) { //TODO: remove this, it is only used in unit testing var calctup = new DeviceEnergyProfileTuple(dev, newprof, lt, timeoffset, internalstepsize, multiplier, probability); Energyprofiles.Add(calctup); }