Example #1
0
 private void ShowDebugSkipInfo(Handler handler, ArgumentNode fromArgumentNode, ArgumentNode toArgumentNode)
 {
     if (handler.SkipInfo)
     {
         Optional <JoinType> joinType = toArgumentNode.argument.JoinType;
         string message = SkipInfoBuilder.GetSkipReasonDetails(handler, fromArgumentNode, toArgumentNode, joinType);
         LoggerProvider.GetLogger(this).Warn(message);
     }
 }
Example #2
0
        public virtual bool Combine(HandlerInvokeGraph handlerInvokeGraph, ICollection <Entity> contextEntities)
        {
            ArgumentNode[] argumentNodes    = handlerInvokeGraph.ArgumentNodes;
            ArgumentNode   fromArgumentNode = null;
            Handler        handler          = handlerInvokeGraph.Handler;

            for (int i = 0; i < argumentNodes.Length; i++)
            {
                ArgumentNode toArgumentNode = argumentNodes[i];
                if (!this.FillEntityNodes(contextEntities, fromArgumentNode, toArgumentNode))
                {
                    if (handler.Mandatory || toArgumentNode.argument.Mandatory)
                    {
                        throw new MandatoryException(SkipInfoBuilder.GetSkipReasonDetails(handler, fromArgumentNode, toArgumentNode, toArgumentNode.argument.JoinType));
                    }
                    return(false);
                }
                fromArgumentNode = toArgumentNode;
            }
            this.Finalize(handlerInvokeGraph);
            return(true);
        }