/// <inheritdoc/> public string ToDelimitedString() { CultureInfo culture = CultureInfo.CurrentCulture; return(string.Format( culture, StringHelper.StringFormatSequence(0, 6, Configuration.FieldSeparator), Id, EquipmentInstanceIdentifier?.ToDelimitedString(), EventDateTime.HasValue ? EventDateTime.Value.ToString(Consts.DateTimeFormatPrecisionSecond, culture) : null, EquipmentState?.ToDelimitedString(), LocalRemoteControlState?.ToDelimitedString(), AlertLevel?.ToDelimitedString() ).TrimEnd(Configuration.FieldSeparator.ToCharArray())); }
/// <inheritdoc/> public string ToDelimitedString() { CultureInfo culture = CultureInfo.CurrentCulture; return(string.Format( culture, StringHelper.StringFormatSequence(0, 7, Configuration.FieldSeparator), Id, EquipmentInstanceIdentifier != null ? string.Join(Configuration.FieldRepeatSeparator, EquipmentInstanceIdentifier.Select(x => x.ToDelimitedString())) : null, EventDateTime.HasValue ? EventDateTime.Value.ToString(Consts.DateTimeFormatPrecisionSecond, culture) : null, EquipmentState?.ToDelimitedString(), LocalRemoteControlState?.ToDelimitedString(), AlertLevel?.ToDelimitedString(), ExpectedDateTimeOfTheNextStatusChange.HasValue ? ExpectedDateTimeOfTheNextStatusChange.Value.ToString(Consts.DateTimeFormatPrecisionSecond, culture) : null ).TrimEnd(Configuration.FieldSeparator.ToCharArray())); }