1- using ReactiveUI ;
21using System ;
32using System . Collections . Generic ;
43using System . Collections . Specialized ;
76using System . Reactive . Concurrency ;
87using System . Reactive . Disposables ;
98using System . Reactive . Linq ;
10- using System . Runtime . Serialization ;
11- using System . Text ;
129using System . Reflection ;
10+ using System . Runtime . Serialization ;
1311using Splat ;
1412
1513namespace ReactiveUI
@@ -33,11 +31,16 @@ public static class AutoPersistHelper
3331 /// Changes to properties not marked with DataMember will not trigger the
3432 /// object to be saved.
3533 /// </summary>
36- /// <param name="doPersist">The asynchronous method to call to save the
37- /// object to disk.</param>
38- /// <param name="interval">The interval to save the object on. Note that
39- /// if an object is constantly changing, it is possible that it will never
40- /// be saved.</param>
34+ /// <param name="This">
35+ /// The reactive object to watch for changes
36+ /// </param>
37+ /// <param name="doPersist">
38+ /// The asynchronous method to call to save the object to disk.
39+ /// </param>
40+ /// <param name="interval">
41+ /// The interval to save the object on. Note that if an object is constantly changing,
42+ /// it is possible that it will never be saved.
43+ /// </param>
4144 /// <returns>A Disposable to disable automatic persistence.</returns>
4245 public static IDisposable AutoPersist < T > ( this T This , Func < T , IObservable < Unit > > doPersist , TimeSpan ? interval = null )
4346 where T : IReactiveObject
@@ -52,13 +55,19 @@ public static IDisposable AutoPersist<T>(this T This, Func<T, IObservable<Unit>>
5255 /// Changes to properties not marked with DataMember will not trigger the
5356 /// object to be saved.
5457 /// </summary>
55- /// <param name="doPersist">The asynchronous method to call to save the
56- /// object to disk.</param>
57- /// <param name="manualSaveSignal">When invoked, the object will be saved
58- /// regardless of whether it has changed.</param>
59- /// <param name="interval">The interval to save the object on. Note that
60- /// if an object is constantly changing, it is possible that it will never
61- /// be saved.</param>
58+ /// <param name="This">
59+ /// The reactive object to watch for changes
60+ /// </param>
61+ /// <param name="doPersist">
62+ /// The asynchronous method to call to save the object to disk.
63+ /// </param>
64+ /// <param name="manualSaveSignal">
65+ /// When invoked, the object will be saved regardless of whether it has changed.
66+ /// </param>
67+ /// <param name="interval">
68+ /// The interval to save the object on. Note that if an object is constantly changing,
69+ /// it is possible that it will never be saved.
70+ /// </param>
6271 /// <returns>A Disposable to disable automatic persistence.</returns>
6372 public static IDisposable AutoPersist < T , TDontCare > ( this T This , Func < T , IObservable < Unit > > doPersist , IObservable < TDontCare > manualSaveSignal , TimeSpan ? interval = null )
6473 where T : IReactiveObject
@@ -100,11 +109,16 @@ public static IDisposable AutoPersist<T, TDontCare>(this T This, Func<T, IObserv
100109 /// Apply AutoPersistence to all objects in a collection. Items that are
101110 /// no longer in the collection won't be persisted anymore.
102111 /// </summary>
103- /// <param name="doPersist">The asynchronous method to call to save the
104- /// object to disk.</param>
105- /// <param name="interval">The interval to save the object on. Note that
106- /// if an object is constantly changing, it is possible that it will never
107- /// be saved.</param>
112+ /// <param name="This">
113+ /// The reactive collection to watch for changes
114+ /// </param>
115+ /// <param name="doPersist">
116+ /// The asynchronous method to call to save the object to disk.
117+ /// </param>
118+ /// <param name="interval">
119+ /// The interval to save the object on. Note that if an object is constantly changing,
120+ /// it is possible that it will never be saved.
121+ /// </param>
108122 /// <returns>A Disposable to disable automatic persistence.</returns>
109123 public static IDisposable AutoPersistCollection < T > ( this IReactiveCollection < T > This , Func < T , IObservable < Unit > > doPersist , TimeSpan ? interval = null )
110124 where T : IReactiveObject
@@ -116,13 +130,19 @@ public static IDisposable AutoPersistCollection<T>(this IReactiveCollection<T> T
116130 /// Apply AutoPersistence to all objects in a collection. Items that are
117131 /// no longer in the collection won't be persisted anymore.
118132 /// </summary>
119- /// <param name="doPersist">The asynchronous method to call to save the
120- /// object to disk.</param>
121- /// <param name="manualSaveSignal">When invoked, the object will be saved
122- /// regardless of whether it has changed.</param>
123- /// <param name="interval">The interval to save the object on. Note that
124- /// if an object is constantly changing, it is possible that it will never
125- /// be saved.</param>
133+ /// <param name="This">
134+ /// The reactive collection to watch for changes
135+ /// </param>
136+ /// <param name="doPersist">
137+ /// The asynchronous method to call to save the object to disk.
138+ /// </param>
139+ /// <param name="manualSaveSignal">
140+ /// When invoked, the object will be saved regardless of whether it has changed.
141+ /// </param>
142+ /// <param name="interval">
143+ /// The interval to save the object on. Note that if an object is constantly changing,
144+ /// it is possible that it will never be saved.
145+ /// </param>
126146 /// <returns>A Disposable to disable automatic persistence.</returns>
127147 public static IDisposable AutoPersistCollection < T , TDontCare > ( this IReactiveCollection < T > This , Func < T , IObservable < Unit > > doPersist , IObservable < TDontCare > manualSaveSignal , TimeSpan ? interval = null )
128148 where T : IReactiveObject
@@ -150,10 +170,15 @@ public static IDisposable AutoPersistCollection<T, TDontCare>(this IReactiveColl
150170 /// removed from a collection. This class correctly handles both when
151171 /// a collection is initialized, as well as when the collection is Reset.
152172 /// </summary>
153- /// <param name="onAdd">A method to be called when an object is added
154- /// to the collection.</param>
155- /// <param name="onRemove">A method to be called when an object is removed
156- /// from the collection.</param>
173+ /// <param name="This">
174+ /// The reactive collection to watch for changes
175+ /// </param>
176+ /// <param name="onAdd">
177+ /// A method to be called when an object is added to the collection.
178+ /// </param>
179+ /// <param name="onRemove">
180+ /// A method to be called when an object is removed from the collection.
181+ /// </param>
157182 /// <returns>A Disposable that deactivates this behavior.</returns>
158183 public static IDisposable ActOnEveryObject < T > ( this IReactiveCollection < T > This , Action < T > onAdd , Action < T > onRemove )
159184 where T : IReactiveObject
0 commit comments