public override bool Equals(object obj) { MethodCacheKey key = obj as MethodCacheKey; if (key != null && key.TypeName == this.TypeName && key.MethodName == this.MethodName && ArrayEquals(key.ParamTypes, this.ParamTypes)) { return(true); } return(false); }
public static MethodCacheKey Create(string typeName, string methodName, Type[] paramTypes) { MethodCacheKey key = new MethodCacheKey(); key.TypeName = typeName; key.MethodName = methodName; key.ParamTypes = paramTypes; key.HashKey = key.TypeName.GetHashCode(); key.HashKey = key.HashKey ^ key.MethodName.GetHashCode(); foreach (Type item in key.ParamTypes) key.HashKey = key.HashKey ^ item.Name.GetHashCode(); return key; }
public static MethodCacheKey Create(string typeName, string methodName, Type[] paramTypes) { MethodCacheKey key = new MethodCacheKey(); key.TypeName = typeName; key.MethodName = methodName; key.ParamTypes = paramTypes; key.HashKey = key.TypeName.GetHashCode(); key.HashKey = key.HashKey ^ key.MethodName.GetHashCode(); foreach (Type item in key.ParamTypes) { key.HashKey = key.HashKey ^ item.Name.GetHashCode(); } return(key); }