Exemple #1
0
        internal static int ComputeId(string typeName, string typeNamespace)
        {
            int currentKey = typeName.GetHashCode();

            if (typeNamespace != null)
            {
                currentKey = IdUtil.HashCombine(typeNamespace.GetHashCode(), currentKey);
            }
            return(currentKey);
        }
Exemple #2
0
        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);
        }