Show / Hide Table of Contents

Class ExceptionExtensions

Useful extension methods for working with exceptions that can be transient faults.

Inheritance
Object
ExceptionExtensions
Inherited Members
System.Object.ToString()
Object.Equals(Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
Object.MemberwiseClone()
Namespace: IRM.TransientFaultHandling
Assembly: IRM.dll
Syntax
public static class ExceptionExtensions

Methods

GetSleepDuration(Exception, TimeSpan)

Gets the required sleep duration before retrying the action that caused exception.

Declaration
public static TimeSpan GetSleepDuration(this Exception exception, TimeSpan duration)
Parameters
Exception exception

The Exception that triggers a retry.

TimeSpan duration

The duration that the logic want to sleep before retrying.

Returns
TimeSpan

Returns the duration or another TimeSpan if there is a minimum wait time associated with the exception.

Back to top Generated by DocFX