Exemplo n.º 1
0
 internal void Add(CorrelationKeyCalculator.CorrelationCacheKey key, CorrelationKey value)
 {
     lock (this.cacheLock)
     {
         this.cache.Add(key, value);
     }
 }
Exemplo n.º 2
0
            private CorrelationKey GetInstanceKey(Dictionary <string, string> values)
            {
                CorrelationKey key;

                if (values.Count > 3)
                {
                    return(new CorrelationKey(values, this.parent.scopeName.ToString(), null));
                }
                CorrelationKeyCalculator.CorrelationCacheKey key2 = CorrelationKeyCalculator.CorrelationCacheKey.CreateKey(values);
                if (!this.parent.keyCache.TryGetValue(key2, out key))
                {
                    key = new CorrelationKey(values, this.parent.scopeName.ToString(), null);
                    this.parent.keyCache.Add(key2, key);
                }
                return(key);
            }
Exemplo n.º 3
0
 internal bool TryGetValue(CorrelationKeyCalculator.CorrelationCacheKey key, out CorrelationKey value)
 {
     value = (CorrelationKey)this.cache.GetValue(this.cacheLock, key);
     return(value != null);
 }