Beispiel #1
0
        public ParamSig(MethodDefinition method)
        {
            ParamTypes = new string[method.Parameters.Count];

            int i = 0;

            foreach (ParameterDefinition param in method.Parameters)
            {
                ParamTypes[i++] = Helper.GetParameterTypeName(param);
            }

            hashCode = CalcHashCode();
        }
Beispiel #2
0
        public virtual bool Matches(MemberReference member)
        {
            MethodReference methodRef = member as MethodReference;

            if (methodRef != null)
            {
                if (methodRef.Name == Name && methodRef.Parameters.Count == ParamTypes.Length)
                {
                    for (int i = 0; i < ParamTypes.Length; i++)
                    {
                        if (Helper.GetParameterTypeName(methodRef.Parameters [i]) != ParamTypes [i])
                        {
                            return(false);
                        }
                    }

                    return(true);
                }
            }

            return(false);
        }