From 304437b834e8c87687f68333ae67a13ee1377a73 Mon Sep 17 00:00:00 2001 From: Dennis Kobert Date: Wed, 12 Jun 2019 21:47:51 +0200 Subject: Adjust Codestyle --- dsa/FireBase/Extensions/ObservableExtensions.cs | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'dsa/FireBase/Extensions/ObservableExtensions.cs') diff --git a/dsa/FireBase/Extensions/ObservableExtensions.cs b/dsa/FireBase/Extensions/ObservableExtensions.cs index 0a672d7..1dae7e9 100644 --- a/dsa/FireBase/Extensions/ObservableExtensions.cs +++ b/dsa/FireBase/Extensions/ObservableExtensions.cs @@ -1,10 +1,8 @@ using System; using System.Reactive.Linq; -namespace Firebase.Database.Extensions -{ - public static class ObservableExtensions - { +namespace Firebase.Database.Extensions { + public static class ObservableExtensions { /// /// Returns a cold observable which retries (re-subscribes to) the source observable on error until it successfully /// terminates. @@ -20,12 +18,10 @@ namespace Firebase.Database.Extensions this IObservable source, TimeSpan dueTime, Func retryOnError) - where TException : Exception - { + where TException : Exception { var attempt = 0; - return Observable.Defer(() => - { + return Observable.Defer(() => { return (++attempt == 1 ? source : source.DelaySubscription(dueTime)) .Select(item => new Tuple(true, item, null)) .Catch, TException>(e => retryOnError(e) -- cgit v1.2.3-70-g09d2