public void StoreProxyType(Type result, Type baseType, params Type[] baseInterfaces) { lock (_lock) { ProxyCacheEntry entry = new ProxyCacheEntry(baseType, baseInterfaces); _cache[entry] = result; } }
public Type GetProxyType(Type baseType, params Type[] baseInterfaces) { lock (_lock) { ProxyCacheEntry entry = new ProxyCacheEntry(baseType, baseInterfaces); return(_cache[entry]); } }
public void StoreProxyType(Type result, Type baseType, params Type[] baseInterfaces) { lock (_lock) { ProxyCacheEntry entry = new ProxyCacheEntry(baseType, baseInterfaces); _cache[entry] = result; } }
public Type GetProxyType(Type baseType, params Type[] baseInterfaces) { lock (_lock) { ProxyCacheEntry entry = new ProxyCacheEntry(baseType, baseInterfaces); return _cache[entry]; } }
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()); }
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))); }