private void AddReadingComments(Reading reading, double?src, string srcAction, params string[] otherComments)
        {
            var comments = otherComments
                           .Concat(new []
            {
                src.HasValue&& !DoubleHelper.AreSame(src, 0.0) ? $"SRC: {src:F3}" : null,
                srcAction,
            })
                           .Where(s => !string.IsNullOrWhiteSpace(s))
                           .ToList();

            if (comments.Any())
            {
                reading.Comments = string.Join("\r\n", comments);
            }
        }
Пример #2
0
 private static bool HasAdjustmentAmount(double?adjustmentAmount)
 {
     return(adjustmentAmount.HasValue && !DoubleHelper.AreSame(adjustmentAmount, 0));
 }