private void AddCachedNamespace(INamespace parentNamespace, string name, IEntity value) { Dictionary<string, IEntity> subcache; if (!_cache.TryGetValue(parentNamespace, out subcache)) { subcache = new Dictionary<string, IEntity>(); _cache.Add(parentNamespace, subcache); } subcache.Add(name, value); }