public override bool Equals(object o) { TempAssemblyCacheKey key = o as TempAssemblyCacheKey; if (key == null) { return(false); } return(key._type == _type && key._ns == _ns); }
internal void Add(string ns, object o, TempAssembly assembly) { TempAssemblyCacheKey key = new TempAssemblyCacheKey(ns, o); lock (this) { TempAssembly tempAssembly; if (_cache.TryGetValue(key, out tempAssembly) && tempAssembly == assembly) { return; } _cache = new Dictionary <TempAssemblyCacheKey, TempAssembly>(_cache); // clone _cache[key] = assembly; } }