C# Class System.Data.SqlClient.SqlExceptionExtensions

Mostra file Open project: pbolduc/Retry

Public Methods

Method Description
IsConnectionClosed ( this exception ) : bool

Determines whether SqlConnection will be closed when this exception is raised.

The SqlConnection remains open when the severity level is 19 or less. When the severity level is 20 or greater, the server ordinarily closes the SqlConnection. (source=http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlexception.aspx)

IsConnectionError ( this exception ) : bool

Determines whether the specified exception represents a connection error.

IsDatabaseAvailabilityError ( this exception ) : bool

Determines whether the specified exception represents a database availability error.

IsLoginError ( this exception ) : bool

Determines whether the specified exception represents a login error.

IsServiceQueueDisabled ( this exception ) : bool

The service queue "x" is currently disabled.

Private Methods

Method Description
IsNamedPipeConnectionError ( SqlException exception ) : bool
IsTcpIpConnectionError ( SqlException exception ) : bool

Method Details

IsConnectionClosed() public static method

Determines whether SqlConnection will be closed when this exception is raised.
The SqlConnection remains open when the severity level is 19 or less. When the severity level is 20 or greater, the server ordinarily closes the SqlConnection. (source=http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlexception.aspx)
public static IsConnectionClosed ( this exception ) : bool
exception this The exception.
return bool

IsConnectionError() public static method

Determines whether the specified exception represents a connection error.
public static IsConnectionError ( this exception ) : bool
exception this The exception.
return bool

IsDatabaseAvailabilityError() public static method

Determines whether the specified exception represents a database availability error.
public static IsDatabaseAvailabilityError ( this exception ) : bool
exception this The exception.
return bool

IsLoginError() public static method

Determines whether the specified exception represents a login error.
public static IsLoginError ( this exception ) : bool
exception this The exception.
return bool

IsServiceQueueDisabled() public static method

The service queue "x" is currently disabled.
public static IsServiceQueueDisabled ( this exception ) : bool
exception this The exception.
return bool