Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: tidy xml documentation for AutoPersistHelpers #1310

Merged
merged 3 commits into from
Mar 14, 2017
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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