public void Put(IndentKey key, IndentContext iu) { lock (locker) { indentDictionary[key.GetKey()] = iu; } }
public IndentContext Get(IndentKey key) { string keyStr = key.GetKey(); lock (locker) { if (indentDictionary.ContainsKey(keyStr)) { return(indentDictionary[keyStr]); } else { IndentContext iu = new IndentContext(); indentDictionary.Add(keyStr, iu); return(iu); } } }