Beispiel #1
0
        static bool IsVarArgCallTo(MethodDefinition method, MethodReference reference)
        {
            if (method.Parameters.Count >= reference.Parameters.Count)
            {
                return(false);
            }

            if (reference.GetSentinelPosition() != method.Parameters.Count)
            {
                return(false);
            }

            for (int i = 0; i < method.Parameters.Count; i++)
            {
                if (!AreSame(method.Parameters[i].ParameterType, reference.Parameters[i].ParameterType))
                {
                    return(false);
                }
            }

            return(true);
        }