Ejemplo n.º 1
0
        /// <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()));
        }
Ejemplo n.º 2
0
        /// <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()));
        }