AspectSharp.Core.Matchers.DefaultJoinPointMatcher.ArgumentsMatch C# (CSharp) Метод

ArgumentsMatch() защищенный Метод

protected ArgumentsMatch ( MethodSignature signature, MethodInfo method ) : bool
signature AspectSharp.Lang.AST.MethodSignature
method System.Reflection.MethodInfo
Результат bool
		protected virtual bool ArgumentsMatch(MethodSignature signature, MethodInfo method)
		{
			if (signature.AllArguments)
			{
				return true;
			}

			String[] arguments = signature.Arguments;
			ParameterInfo[] parameters = method.GetParameters();

			for (int i = 0; i < arguments.Length; i++)
			{
				String argName = arguments[i];

				if (argName.Equals("*"))
				{
					break;
				}
				else if (i == parameters.Length)
				{
					return false;
				}
				else if (i == arguments.Length - 1 && arguments.Length != parameters.Length)
				{
					return false;
				}

				if (!TypeMatch(argName, parameters[i].ParameterType))
				{
					return false;
				}
			}

			return true;
		}