Exemplo n.º 1
0
 public void StoreProxyType(Type result, Type baseType, params Type[] baseInterfaces)
 {
     lock (_lock)
     {
         ProxyCacheEntry entry = new ProxyCacheEntry(baseType, baseInterfaces);
         _cache[entry] = result;
     }
 }
Exemplo n.º 2
0
 public Type GetProxyType(Type baseType, params Type[] baseInterfaces)
 {
     lock (_lock)
     {
         ProxyCacheEntry entry = new ProxyCacheEntry(baseType, baseInterfaces);
         return(_cache[entry]);
     }
 }
Exemplo n.º 3
0
		public void StoreProxyType(Type result, Type baseType, params Type[] baseInterfaces)
		{
            lock (_lock)
            {
                ProxyCacheEntry entry = new ProxyCacheEntry(baseType, baseInterfaces);
                _cache[entry] = result;
            }
		}
Exemplo n.º 4
0
		public Type GetProxyType(Type baseType, params Type[] baseInterfaces)
		{
            lock (_lock)
            {
                ProxyCacheEntry entry = new ProxyCacheEntry(baseType, baseInterfaces);
                return _cache[entry];
            }
		}
Exemplo n.º 5
0
		public bool Contains(Type baseType, params Type[] baseInterfaces)
		{
			if (baseType == null)
				return false;

			ProxyCacheEntry entry = new ProxyCacheEntry(baseType, baseInterfaces);
			return _cache.ContainsKey(entry);
		}
Exemplo n.º 6
0
        public override bool Equals(object obj)
        {
            if (!(obj is ProxyCacheEntry))
            {
                return(false);
            }

            ProxyCacheEntry other = (ProxyCacheEntry)obj;

            return(hashCode == other.GetHashCode());
        }
Exemplo n.º 7
0
        public bool Contains(Type baseType, params Type[] baseInterfaces)
        {
            if (baseType == null)
            {
                return(false);
            }

            ProxyCacheEntry entry = new ProxyCacheEntry(baseType, baseInterfaces);

            return(_cache.ContainsKey(entry));
        }
        public override bool Equals(object obj)
        {
            if (!(obj is ProxyCacheEntry))
            {
                return(false);
            }

            ProxyCacheEntry other = (ProxyCacheEntry)obj;

            return(hashCode == other.GetHashCode() &&
                   BaseType == other.BaseType &&
                   GetTypes(BaseType, Interfaces).SetEquals(GetTypes(other.BaseType, other.Interfaces)));
        }