public static IsConnectionClosed ( this exception ) : bool | ||
exception | this | The exception. |
return | bool |
public static bool IsConnectionClosed(this SqlException exception)
{
Contract.Requires(exception != null);
for (int i = 0; i < exception.Errors.Count; i++)
{
if (20 <= exception.Errors[i].Class)
{
return true;
}
}
return false;
}