diff options
Diffstat (limited to 'FireBase/ObservableExtensions.cs')
-rw-r--r-- | FireBase/ObservableExtensions.cs | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/FireBase/ObservableExtensions.cs b/FireBase/ObservableExtensions.cs index 37c3ef7..bc46261 100644 --- a/FireBase/ObservableExtensions.cs +++ b/FireBase/ObservableExtensions.cs @@ -1,21 +1,20 @@ -namespace Firebase.Database -{ - using System; - using System.Collections.ObjectModel; - - using Firebase.Database.Streaming; +using System; +using System.Collections.ObjectModel; +using Firebase.Database.Streaming; +namespace Firebase.Database +{ /// <summary> - /// Extensions for <see cref="IObservable{T}"/>. + /// Extensions for <see cref="IObservable{T}" />. /// </summary> public static class ObservableExtensions { /// <summary> - /// Starts observing on given firebase observable and propagates event into an <see cref="ObservableCollection{T}"/>. + /// Starts observing on given firebase observable and propagates event into an <see cref="ObservableCollection{T}" />. /// </summary> /// <param name="observable"> The observable. </param> /// <typeparam name="T"> Type of entity. </typeparam> - /// <returns> The <see cref="ObservableCollection{T}"/>. </returns> + /// <returns> The <see cref="ObservableCollection{T}" />. </returns> public static ObservableCollection<T> AsObservableCollection<T>(this IObservable<FirebaseEvent<T>> observable) { var collection = new ObservableCollection<T>(); @@ -25,10 +24,7 @@ if (f.EventType == FirebaseEventType.InsertOrUpdate) { var i = collection.IndexOf(f.Object); - if (i >= 0) - { - collection.RemoveAt(i); - } + if (i >= 0) collection.RemoveAt(i); collection.Add(f.Object); } @@ -41,4 +37,4 @@ return collection; } } -} +}
\ No newline at end of file |