示例#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>();
 }
示例#3
0
 public ArgLockingMemoizingContainer(Func <TArg, TResult> func)
 {
     _cache = new Dictionary <TArg, TResult>();
     _locks = new LockTable <TArg>();
     _func  = func;
 }
示例#4
0
 public ArgLockingMemoizer(IEqualityComparer <TArg> comparer)
 {
     _cache = new Dictionary <TArg, TResult>(comparer);
     _locks = new LockTable <TArg>(comparer);
 }