Пример #1
0
        private List <HandlerArgument> ParseHandlerArguments(bool isNodeChangeHandler)
        {
            ParameterInfo[]   parameters = this.method.GetParameters();
            HandlerArgument[] arguments  = new HandlerArgument[parameters.Length - 1];
            int position = 0;
            Optional <JoinType> rightJoin = Optional <JoinType> .empty();

            for (int i = parameters.Length - 1; i > 0; i--)
            {
                position = i - 1;
                ParameterInfo       parameterInfo    = parameters[i];
                object[]            customAttributes = parameterInfo.GetCustomAttributes(true);
                Optional <JoinType> joinType         = GetJoinType(customAttributes);
                HandlerArgument     argument         = CreateNodeType(position, parameterInfo.ParameterType, joinType, rightJoin, customAttributes, isNodeChangeHandler);
                rightJoin = joinType;
                if (argument == null)
                {
                    throw new ArgumentMustBeNodeException(this.method, parameterInfo);
                }
                arguments[position] = argument;
            }
            this.CheckArguments(arguments);
            return(arguments.ToList <HandlerArgument>());
        }