private IEnumerable <double> ApplyDoubleTransformation(Transformation <double> transformation, IList <double> data, out bool success, out string errorMsg) { success = transformation.Check(data, out errorMsg); // don't apply when the check fails if (success) { return(transformation.ConfigureAndApply(data)); } else { return(data); } }