Example #1
0
 private CacheDictionary(TryResolveValue tryResolveValue, ResolveValue resolveValue, IMinimalDictionary valuesContainer, IMinimalSet unsetValuesContainer)
 {
     this.tryResolveValue = tryResolveValue;
     this.resolveValue    = resolveValue;
     this.values          = valuesContainer;
     this.unsetValues     = unsetValuesContainer;
 }
Example #2
0
        private CacheDictionary(TryResolveValue tryResolveValue, ResolveValue resolveValue)
        {
            this.tryResolveValue = tryResolveValue;
            this.resolveValue    = resolveValue;

            dictionary  = new Dictionary <TKey, TValue>();
            unsetValues = new HashSet <TKey>();
        }
Example #3
0
        private CacheDictionary(TryResolveValue tryResolveValue, ResolveValue resolveValue, IEqualityComparer <TKey> equalityComparer)
        {
            this.tryResolveValue = tryResolveValue;
            this.resolveValue    = resolveValue;

            dictionary  = new Dictionary <TKey, TValue>(equalityComparer);
            unsetValues = new HashSet <TKey>();
        }
Example #4
0
 public CacheDictionary(TryResolveValue tryResolveValue) :
     this(tryResolveValue, null)
 {
     //
 }
Example #5
0
 public static CacheDictionary <TKey, TValue> Create(TryResolveValue tryResolveValue, IEqualityComparer <TKey> comparer = null)
 {
     return(new CacheDictionary <TKey, TValue>(tryResolveValue, null, new MinimalDictionary <TKey, TValue>(comparer), new MinimalSet <TKey>(comparer)));
 }
Example #6
0
 public static CacheDictionary <TKey, TValue> CreateUsingStringKeys(TryResolveValue tryResolveValue, Func <TKey, string> getStringKey = null)
 {
     return(new CacheDictionary <TKey, TValue>(tryResolveValue, null, new ConvertedStringDictionary <TKey, TValue>(getStringKey), new ConvertedStringSet <TKey>(getStringKey)));
 }
Example #7
0
 public CacheDictionary(TryResolveValue tryResolveValue, IEqualityComparer <TKey> equalityComparer = null) :
     this(tryResolveValue, null, equalityComparer)
 {
     //
 }