public string HeaderString([NotNull] CalcLoadTypeDto lt, [NotNull] CalcParameters calcParameters)
        {
            if (calcParameters.DeviceProfileHeaderMode == DeviceProfileHeaderMode.Standard)
            {
                while (Name.EndsWith(calcParameters.CSVCharacter, StringComparison.Ordinal))
                {
                    Name = Name.Substring(0, Name.Length - 1);
                }

                var housenumber = HouseholdKey + " - ";
                if (LocationName.Length > 0 && Name.Length > 0)
                {
                    return(housenumber + LocationName + " - " + Name + " [" + lt.UnitOfSum + "]" + calcParameters.CSVCharacter);
                }

                if (LocationName.Length == 0 && Name.Length > 0)
                {
                    return(Name + " [" + lt.UnitOfSum + "]" + calcParameters.CSVCharacter);
                }

                return(housenumber + LocationName + " - (none) [" + lt.UnitOfSum + "]" + calcParameters.CSVCharacter);
            }

            if (calcParameters.DeviceProfileHeaderMode == DeviceProfileHeaderMode.OnlyDeviceCategories)
            {
                return(DeviceCategory + " [" + lt.UnitOfSum + "]" + calcParameters.CSVCharacter);
            }
            throw new LPGException("Forgotten Device Profile Header Mode");
        }
        public static OnlineEnergyFileRow Read([NotNull] BinaryReader br, [NotNull] CalcLoadTypeDto lt,
                                               [NotNull] CalcParameters parameters)
        {
            if (parameters == null)
            {
                throw new ArgumentNullException(nameof(parameters));
            }

            var timestep = new TimeStep(br.ReadInt32(), parameters);
            var length   = br.ReadInt32();
            var valuearr = new List <double>(new double[length]);

            for (var i = 0; i < length; i++)
            {
                valuearr[i] = br.ReadDouble();
            }
            var efr = new OnlineEnergyFileRow(timestep, valuearr, lt);

            return(efr);
        }