@@ -96,21 +96,21 @@ protected override void OnBeforeDispose()
9696 Modified = null ; // Clean events before swap.
9797 }
9898
99- protected override void OnDispose ( bool calledExplicitly )
99+ protected override void OnDispose ( )
100100 {
101101 Modified = null ; // Just in case.
102102 }
103103
104104
105105 public virtual void Reading ( Action action )
106106 {
107- AssertIsAlive ( ) ;
107+ this . AssertIsAlive ( ) ;
108108 action ( ) ;
109109 }
110110
111111 public virtual T Reading < T > ( Func < T > action )
112112 {
113- AssertIsAlive ( ) ;
113+ this . AssertIsAlive ( ) ;
114114 return action ( ) ;
115115 }
116116
@@ -136,7 +136,7 @@ public bool Modifying(Action action, bool assumeChange = false)
136136
137137 public virtual bool Modifying ( Func < bool > condition , Func < bool > action )
138138 {
139- AssertIsAlive ( ) ;
139+ this . AssertIsAlive ( ) ;
140140 if ( condition != null && ! condition ( ) )
141141 return false ;
142142
@@ -152,7 +152,7 @@ public virtual bool Modifying(Func<bool> condition, Func<bool> action)
152152
153153 public virtual bool Modifying < T > ( ref T target , T newValue )
154154 {
155- AssertIsAlive ( ) ;
155+ this . AssertIsAlive ( ) ;
156156 if ( target . Equals ( newValue ) ) return false ;
157157
158158 IncrementVersion ( ) ;
@@ -177,13 +177,13 @@ public SimpleLockingModificationSynchronizer(object sync = null)
177177
178178 public override void Reading ( Action action )
179179 {
180- AssertIsAlive ( ) ;
180+ this . AssertIsAlive ( ) ;
181181 lock ( _sync ) action ( ) ;
182182 }
183183
184184 public override T Reading < T > ( Func < T > action )
185185 {
186- AssertIsAlive ( ) ;
186+ this . AssertIsAlive ( ) ;
187187 lock ( _sync ) return action ( ) ;
188188 }
189189
@@ -192,7 +192,7 @@ public override bool Modifying(Func<bool> condition, Func<bool> action)
192192 var modified = false ;
193193 ThreadSafety . LockConditional (
194194 _sync ,
195- ( ) => AssertIsAlive ( ) && ( condition == null || condition ( ) ) ,
195+ ( ) => this . AssertIsAlive ( ) && ( condition == null || condition ( ) ) ,
196196 ( ) => { modified = base . Modifying ( null , action ) ; }
197197 ) ;
198198 return modified ;
@@ -201,7 +201,7 @@ public override bool Modifying(Func<bool> condition, Func<bool> action)
201201
202202 public override bool Modifying < T > ( ref T target , T newValue )
203203 {
204- AssertIsAlive ( ) ;
204+ this . AssertIsAlive ( ) ;
205205 if ( target . Equals ( newValue ) ) return false ;
206206
207207 lock ( _sync ) return base . Modifying ( ref target , newValue ) ;
@@ -226,11 +226,11 @@ IDisposable Cleanup()
226226 return Interlocked . Exchange ( ref _sync , null ) ;
227227 }
228228
229- protected override void OnDispose ( bool calledExplicitly )
229+ protected override void OnDispose ( )
230230 {
231- base . OnDispose ( calledExplicitly ) ;
231+ base . OnDispose ( ) ;
232232 IDisposable s = null ;
233- if ( ! calledExplicitly || ! _sync . Write ( ( ) => s = Cleanup ( ) , 10 /* Give any cleanup a chance. */ ) )
233+ if ( ! _sync . Write ( ( ) => s = Cleanup ( ) , 10 /* Give any cleanup a chance. */ ) )
234234 {
235235 s = Cleanup ( ) ;
236236 }
@@ -243,19 +243,19 @@ protected override void OnDispose(bool calledExplicitly)
243243
244244 public override void Reading ( Action action )
245245 {
246- AssertIsAlive ( ) ;
246+ this . AssertIsAlive ( ) ;
247247 _sync . Read ( action ) ;
248248 }
249249
250250 public override T Reading < T > ( Func < T > action )
251251 {
252- AssertIsAlive ( ) ;
252+ this . AssertIsAlive ( ) ;
253253 return _sync . ReadValue ( action ) ;
254254 }
255255
256256 public override bool Modifying ( Func < bool > condition , Func < bool > action )
257257 {
258- AssertIsAlive ( ) ;
258+ this . AssertIsAlive ( ) ;
259259
260260 // Try and early invalidate.
261261 if ( condition != null && ! _sync . ReadValue ( condition ) )
@@ -264,7 +264,7 @@ public override bool Modifying(Func<bool> condition, Func<bool> action)
264264 var modified = false ;
265265 _sync . ReadUpgradeable ( ( ) =>
266266 {
267- AssertIsAlive ( ) ;
267+ this . AssertIsAlive ( ) ;
268268 if ( condition == null || condition ( ) )
269269 {
270270 modified = _sync . WriteValue ( ( ) => base . Modifying ( null , action ) ) ;
@@ -276,15 +276,15 @@ public override bool Modifying(Func<bool> condition, Func<bool> action)
276276
277277 public override bool Modifying < T > ( ref T target , T newValue )
278278 {
279- AssertIsAlive ( ) ;
279+ this . AssertIsAlive ( ) ;
280280 if ( target . Equals ( newValue ) ) return false ;
281281
282282 bool changed ;
283283 try
284284 {
285285 // Note, there's no need for _modifyingDepth recursion tracking here.
286286 _sync . EnterUpgradeableReadLock ( ) ;
287- AssertIsAlive ( ) ;
287+ this . AssertIsAlive ( ) ;
288288
289289 //var ver = _version; // Capture the version so that if changes occur indirectly...
290290 changed = ! target . Equals ( newValue ) ;
0 commit comments