Class TransientDetector
Provides some common transient error detection functions for use by IRetryPolicy implementations.
Namespace: Neon.Retry
Assembly: Neon.Common.dll
Syntax
public static class TransientDetector
Methods
Always(Exception)
Considers every exceptions to be transient.
Declaration
public static bool Always(Exception e)
Parameters
Type | Name | Description |
---|---|---|
Exception | e | The potential transient exception. |
Returns
Type | Description |
---|---|
bool |
|
Http(Exception)
Considers HttpException, HttpRequestException, and TransientException as possible transient errors as well as these exceptions nested within an AggregateException.
Declaration
public static bool Http(Exception e)
Parameters
Type | Name | Description |
---|---|---|
Exception | e | The potential transient exception. |
Returns
Type | Description |
---|---|
bool |
|
Remarks
note
TransientException is always considered to be a transient exception.
Network(Exception)
Considers SocketException and TransientException as possible transient errors as well as these exceptions nested within an AggregateException.
Declaration
public static bool Network(Exception e)
Parameters
Type | Name | Description |
---|---|---|
Exception | e | The potential transient exception. |
Returns
Type | Description |
---|---|
bool |
|
Remarks
note
TransientException is always considered to be a transient exception.
NetworkOrHttp(Exception)
Considers SocketException, HttpRequestException, and TransientException as possible transient errors as well as these exceptions nested within an AggregateException.
Declaration
public static bool NetworkOrHttp(Exception e)
Parameters
Type | Name | Description |
---|---|---|
Exception | e | The potential transient exception. |
Returns
Type | Description |
---|---|
bool |
|
Remarks
note
TransientException is always considered to be a transient exception.
Never(Exception)
Considers no exceptions to be transient.
Declaration
public static bool Never(Exception e)
Parameters
Type | Name | Description |
---|---|---|
Exception | e | The potential transient exception. |
Returns
Type | Description |
---|---|
bool |
|