Beispiel #1
0
 public ArgLockingMemoizingContainer(
     IEqualityComparer <TArg> comparer,
     Func <TArg, TResult> func)
 {
     _cache = new Dictionary <TArg, TResult>(comparer);
     _locks = new LockTable <TArg>(comparer);
     _func  = func;
 }
 public ArgLockingMemoizationWrapper()
 {
     _cache = new Dictionary <TArg, TResult>();
     _locks = new LockTable <TArg>();
 }
Beispiel #3
0
 public ArgLockingMemoizingContainer(Func <TArg, TResult> func)
 {
     _cache = new Dictionary <TArg, TResult>();
     _locks = new LockTable <TArg>();
     _func  = func;
 }
Beispiel #4
0
 public ArgLockingMemoizer(IEqualityComparer <TArg> comparer)
 {
     _cache = new Dictionary <TArg, TResult>(comparer);
     _locks = new LockTable <TArg>(comparer);
 }