public static ConfigurationResult CompileResults(IEnumerable<ValidationResult> results)
{
var result = new StateMachineConfigurationResult(results);
if (result.ContainsFailure)
{
var message = "The state machine was not properly configured:" +
Environment.NewLine +
string.Join(Environment.NewLine, result.Results.Select(x => x.ToString()).ToArray());
throw new ConfigurationException(result, message);
}
return result;
}
}