Skip to content

Commit

Permalink
chore: tidy xml documentation for AutoPersistHelpers (#1310)
Browse files Browse the repository at this point in the history
  • Loading branch information
olevett authored and ghuntley committed Mar 14, 2017
1 parent c507b03 commit 41d9f72
Showing 1 changed file with 56 additions and 31 deletions.
87 changes: 56 additions & 31 deletions src/ReactiveUI/AutoPersistHelper.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using ReactiveUI;
using System;
using System.Collections.Generic;
using System.Collections.Specialized;
Expand All @@ -7,9 +6,8 @@
using System.Reactive.Concurrency;
using System.Reactive.Disposables;
using System.Reactive.Linq;
using System.Runtime.Serialization;
using System.Text;
using System.Reflection;
using System.Runtime.Serialization;
using Splat;

namespace ReactiveUI
Expand All @@ -33,11 +31,16 @@ public static class AutoPersistHelper
/// Changes to properties not marked with DataMember will not trigger the
/// object to be saved.
/// </summary>
/// <param name="doPersist">The asynchronous method to call to save the
/// object to disk.</param>
/// <param name="interval">The interval to save the object on. Note that
/// if an object is constantly changing, it is possible that it will never
/// be saved.</param>
/// <param name="This">
/// The reactive object to watch for changes
/// </param>
/// <param name="doPersist">
/// The asynchronous method to call to save the object to disk.
/// </param>
/// <param name="interval">
/// The interval to save the object on. Note that if an object is constantly changing,
/// it is possible that it will never be saved.
/// </param>
/// <returns>A Disposable to disable automatic persistence.</returns>
public static IDisposable AutoPersist<T>(this T This, Func<T, IObservable<Unit>> doPersist, TimeSpan? interval = null)
where T : IReactiveObject
Expand All @@ -52,13 +55,19 @@ public static IDisposable AutoPersist<T>(this T This, Func<T, IObservable<Unit>>
/// Changes to properties not marked with DataMember will not trigger the
/// object to be saved.
/// </summary>
/// <param name="doPersist">The asynchronous method to call to save the
/// object to disk.</param>
/// <param name="manualSaveSignal">When invoked, the object will be saved
/// regardless of whether it has changed.</param>
/// <param name="interval">The interval to save the object on. Note that
/// if an object is constantly changing, it is possible that it will never
/// be saved.</param>
/// <param name="This">
/// The reactive object to watch for changes
/// </param>
/// <param name="doPersist">
/// The asynchronous method to call to save the object to disk.
/// </param>
/// <param name="manualSaveSignal">
/// When invoked, the object will be saved regardless of whether it has changed.
/// </param>
/// <param name="interval">
/// The interval to save the object on. Note that if an object is constantly changing,
/// it is possible that it will never be saved.
/// </param>
/// <returns>A Disposable to disable automatic persistence.</returns>
public static IDisposable AutoPersist<T, TDontCare>(this T This, Func<T, IObservable<Unit>> doPersist, IObservable<TDontCare> manualSaveSignal, TimeSpan? interval = null)
where T : IReactiveObject
Expand Down Expand Up @@ -100,11 +109,16 @@ public static IDisposable AutoPersist<T, TDontCare>(this T This, Func<T, IObserv
/// Apply AutoPersistence to all objects in a collection. Items that are
/// no longer in the collection won't be persisted anymore.
/// </summary>
/// <param name="doPersist">The asynchronous method to call to save the
/// object to disk.</param>
/// <param name="interval">The interval to save the object on. Note that
/// if an object is constantly changing, it is possible that it will never
/// be saved.</param>
/// <param name="This">
/// The reactive collection to watch for changes
/// </param>
/// <param name="doPersist">
/// The asynchronous method to call to save the object to disk.
/// </param>
/// <param name="interval">
/// The interval to save the object on. Note that if an object is constantly changing,
/// it is possible that it will never be saved.
/// </param>
/// <returns>A Disposable to disable automatic persistence.</returns>
public static IDisposable AutoPersistCollection<T>(this IReactiveCollection<T> This, Func<T, IObservable<Unit>> doPersist, TimeSpan? interval = null)
where T : IReactiveObject
Expand All @@ -116,13 +130,19 @@ public static IDisposable AutoPersistCollection<T>(this IReactiveCollection<T> T
/// Apply AutoPersistence to all objects in a collection. Items that are
/// no longer in the collection won't be persisted anymore.
/// </summary>
/// <param name="doPersist">The asynchronous method to call to save the
/// object to disk.</param>
/// <param name="manualSaveSignal">When invoked, the object will be saved
/// regardless of whether it has changed.</param>
/// <param name="interval">The interval to save the object on. Note that
/// if an object is constantly changing, it is possible that it will never
/// be saved.</param>
/// <param name="This">
/// The reactive collection to watch for changes
/// </param>
/// <param name="doPersist">
/// The asynchronous method to call to save the object to disk.
/// </param>
/// <param name="manualSaveSignal">
/// When invoked, the object will be saved regardless of whether it has changed.
/// </param>
/// <param name="interval">
/// The interval to save the object on. Note that if an object is constantly changing,
/// it is possible that it will never be saved.
/// </param>
/// <returns>A Disposable to disable automatic persistence.</returns>
public static IDisposable AutoPersistCollection<T, TDontCare>(this IReactiveCollection<T> This, Func<T, IObservable<Unit>> doPersist, IObservable<TDontCare> manualSaveSignal, TimeSpan? interval = null)
where T : IReactiveObject
Expand Down Expand Up @@ -150,10 +170,15 @@ public static IDisposable AutoPersistCollection<T, TDontCare>(this IReactiveColl
/// removed from a collection. This class correctly handles both when
/// a collection is initialized, as well as when the collection is Reset.
/// </summary>
/// <param name="onAdd">A method to be called when an object is added
/// to the collection.</param>
/// <param name="onRemove">A method to be called when an object is removed
/// from the collection.</param>
/// <param name="This">
/// The reactive collection to watch for changes
/// </param>
/// <param name="onAdd">
/// A method to be called when an object is added to the collection.
/// </param>
/// <param name="onRemove">
/// A method to be called when an object is removed from the collection.
/// </param>
/// <returns>A Disposable that deactivates this behavior.</returns>
public static IDisposable ActOnEveryObject<T>(this IReactiveCollection<T> This, Action<T> onAdd, Action<T> onRemove)
where T : IReactiveObject
Expand Down

0 comments on commit 41d9f72

Please sign in to comment.