Class InternalEx
- Namespace
- DynamicData.Kernel
- Assembly
- DynamicData.dll
Extensions associated with times and intervals.
public static class InternalEx
- Inheritance
-
InternalEx
Methods
RetryWithBackOff<TSource, TException>(IObservable<TSource>, Func<TException, int, TimeSpan?>)
Retries the with back off.
public static IObservable<TSource> RetryWithBackOff<TSource, TException>(this IObservable<TSource> source, Func<TException, int, TimeSpan?> backOffStrategy) where TException : Exception
Parameters
source
IObservable<TSource>The source.
backOffStrategy
Func<TException, int, TimeSpan?>The back off strategy.
Returns
- IObservable<TSource>
An observable which will emit the value.
Type Parameters
TSource
The type of the source.
TException
The type of the exception.
Remarks
With big thanks. I took this from https://social.msdn.microsoft.com/Forums/en-US/af43b14e-fb00-42d4-8fb1-5c45862f7796/recursive-async-web-requestresponse-what-is-best-practice-3rd-try.
ScheduleRecurringAction(IScheduler, Func<TimeSpan>, Action)
Schedules a recurring action.
public static IDisposable ScheduleRecurringAction(this IScheduler scheduler, Func<TimeSpan> interval, Action action)
Parameters
Returns
- IDisposable
A disposable that will stop the schedule.
Remarks
I took this from.
https://www.zerobugbuild.com/?p=259.
and adapted it to receive.
ScheduleRecurringAction(IScheduler, TimeSpan, Action)
Schedules a recurring action.
public static IDisposable ScheduleRecurringAction(this IScheduler scheduler, TimeSpan interval, Action action)
Parameters
Returns
- IDisposable
A disposable that will stop the schedule.
Remarks
I took this from https://www.zerobugbuild.com/?p=259.