Exemple #1
0
        public override bool Equals(object o)
        {
            TempAssemblyCacheKey key = o as TempAssemblyCacheKey;

            if (key == null)
            {
                return(false);
            }
            return(key._type == _type && key._ns == _ns);
        }
Exemple #2
0
        internal void Add(string ns, object o, TempAssembly assembly)
        {
            TempAssemblyCacheKey key = new TempAssemblyCacheKey(ns, o);

            lock (this)
            {
                if (_cache[key] == assembly)
                {
                    return;
                }
                Hashtable clone = new Hashtable();
                foreach (object k in _cache.Keys)
                {
                    clone.Add(k, _cache[k]);
                }
                _cache      = clone;
                _cache[key] = assembly;
            }
        }