Example #1
0
        public static TaskOutlierModel ToModel(this TaskOutlierDto outlierDto)
        {
            if (outlierDto == null)
            {
                throw new ArgumentNullException(nameof(outlierDto));
            }

            return(new TaskOutlierModel
            {
                Time = outlierDto.Time,
                Value = outlierDto.Value,
            });
        }
Example #2
0
 public static bool AreEqual(TaskOutlierModel model, TaskOutlierDto dto, double tolerance)
 {
     return(Math.Abs(model.Time - dto.Time) < tolerance &&
            Math.Abs(model.Value - dto.Value) < tolerance);
 }