internal void Add(CorrelationKeyCalculator.CorrelationCacheKey key, CorrelationKey value) { lock (this.cacheLock) { this.cache.Add(key, value); } }
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); }
internal bool TryGetValue(CorrelationKeyCalculator.CorrelationCacheKey key, out CorrelationKey value) { value = (CorrelationKey)this.cache.GetValue(this.cacheLock, key); return(value != null); }