internal static int ComputeId(MethodInfo methodInfo) { int currentKey = methodInfo.Name.GetHashCode(); if (methodInfo.DeclaringType != (Type)null) { if (methodInfo.DeclaringType.Namespace != null) { currentKey = IdUtil.HashCombine(methodInfo.DeclaringType.Namespace.GetHashCode(), currentKey); } currentKey = IdUtil.HashCombine(methodInfo.DeclaringType.Name.GetHashCode(), currentKey); } return(currentKey); }
internal static int ComputeIdWithCRC(MethodInfo methodInfo) { string typeName = methodInfo.Name; if (methodInfo.DeclaringType != (Type)null) { if (methodInfo.DeclaringType.Namespace != null) { typeName = methodInfo.DeclaringType.Namespace + typeName; } typeName = methodInfo.DeclaringType.Name + typeName; } return(IdUtil.ComputeIdWithCRC(typeName)); }