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

            if (key == null)
            {
                return(false);
            }
            return((key.type == this.type) && (key.ns == this.ns));
        }
示例#2
0
        public override bool Equals(object o)
        {
            TempAssemblyCacheKey key = o as TempAssemblyCacheKey;

            if (key == null)
            {
                return(false);
            }
            return(key._type == _type && key._ns == _ns);
        }
示例#3
0
 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;
     }
 }
 internal void Add(string ns, object o, TempAssembly assembly)
 {
     TempAssemblyCacheKey key = new TempAssemblyCacheKey(ns, o);
     lock (this)
     {
         if (this.cache[key] != assembly)
         {
             Hashtable hashtable = new Hashtable();
             foreach (object obj2 in this.cache.Keys)
             {
                 hashtable.Add(obj2, this.cache[obj2]);
             }
             this.cache = hashtable;
             this.cache[key] = assembly;
         }
     }
 }
        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;
            }
        }
        internal void Add(string ns, object o, TempAssembly assembly)
        {
            TempAssemblyCacheKey key = new TempAssemblyCacheKey(ns, o);

            lock (this)
            {
                if (this.cache[key] != assembly)
                {
                    Hashtable hashtable = new Hashtable();
                    foreach (object obj2 in this.cache.Keys)
                    {
                        hashtable.Add(obj2, this.cache[obj2]);
                    }
                    this.cache      = hashtable;
                    this.cache[key] = assembly;
                }
            }
        }
 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;
     }
 }