in

ASP.NET Weblogs

Eddie Garmon's Weblog

some architecture, some c#

Doh! Synced Actions and Funcs

After a little more use of the Synchronized<T>, I realized that over half the time I was 'returning true' just to satisfy Func<T, bool> when all that was really needed was an Action<T>.

Read, ReadUpgradeableToWrite, and Write are all overloaded now to take either a Action<T> or a Func<T, TReturn>.

You can get the code here.

 

Comments

No Comments

Leave a Comment

(required)  
(optional)
(required)  
Add