public static TaskOutlierModel ToModel(this TaskOutlierDto outlierDto) { if (outlierDto == null) { throw new ArgumentNullException(nameof(outlierDto)); } return(new TaskOutlierModel { Time = outlierDto.Time, Value = outlierDto.Value, }); }
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); }