using System; namespace Elwig.Helpers.Weighing { /// /// Result of a weighing process on an industrial scale /// public class WeighingResult { /// /// Measured net weight in kg /// public int? Weight = null; /// /// Weighing id (or IdentNr) provided by the scale /// public string? WeighingId = null; /// /// Wheighing id (or IdentNr) provided by the scale optionally combined with the current date /// public string? FullWeighingId = null; /// /// Date string provided by the scale /// public DateOnly? Date = null; /// /// Time string provided by the scale /// public TimeOnly? Time = null; /// <Weight/WeighingId/Date/Time> override public string ToString() { var w = Weight != null ? $"{Weight}kg" : ""; return $"<{w}/{WeighingId}/{Date:yyyy-MM-dd}/{Time:HH:mm}>"; } } }