Example #1
0
 public bool Matches(string functionName, int argCount)
 {
     return(functionName == Name && ArgumentTypes.Count() == argCount);
 }
Example #2
0
        //public bool Matches(string functionName, IEnumerable<Type> argumentTypes)
        //{
        //    return functionName == Name && argumentTypes.Count() == ArgumentTypes.Count() &&
        //           argumentTypes.Zip(ArgumentTypes, (call, sig) => Typecasts.CanCastTo(call,sig)).All(r => r == true);
        //}

        public bool DynamicMatches(string functionName, IEnumerable <object> arguments)
        {
            return(functionName == Name && arguments.Count() == ArgumentTypes.Count() &&
                   arguments.Zip(ArgumentTypes, (call, sig) => Typecasts.CanCastTo(call, sig)).All(r => r == true));
        }