private IsolationMode ObtainIsolation(Type implementation, MethodInfo method, string level)
{
if (level == null)
{
return IsolationMode.Unspecified;
}
try
{
return (IsolationMode)Enum.Parse(typeof(IsolationMode), level, true);
}
catch (Exception)
{
String[] values = (String[])Enum.GetValues(typeof(TransactionMode));
String message = String.Format("The configuration for the class {0}, " +
"method {1}, has specified {2} on {3} attribute which is not supported. " +
"The possible values are {4}",
implementation.FullName, method.Name, level, IsolationModeAtt, String.Join(", ", values));
throw new FacilityException(message);
}
}