コード例 #1
0
 internal virtual string Visit(DLinqInputNode node,
                               CodeMemberMethod vertexMethod,
                               string[] readerNames,
                               string[] writerNames)
 {
     return node.AddVertexCode(vertexMethod, readerNames, writerNames);
 }
コード例 #2
0
 internal DLinqQueryNode Visit(QueryNodeInfo nodeInfo)
 {
     Expression expression = nodeInfo.QueryExpression;
     if (expression.NodeType == ExpressionType.Call)
     {
         MethodCallExpression mcExpr = (MethodCallExpression)expression;
         if (mcExpr.Method.IsStatic && TypeSystem.IsQueryOperatorCall(mcExpr))
         {
             return this.VisitQueryOperatorCall(nodeInfo);
         }
         
         throw DryadLinqException.Create(DryadLinqErrorCode.OperatorNotSupported,
                                         String.Format(SR.OperatorNotSupported, mcExpr.Method.Name),
                                         expression);
     }
     else if (expression.NodeType == ExpressionType.Constant)
     {
         DLinqInputNode inputNode = new DLinqInputNode(this, (ConstantExpression)expression);
         string inputUri = inputNode.Table.DataSourceUri.AbsoluteUri.ToLower();
         if (!this.m_inputUriMap.ContainsKey(inputUri))
         {
             this.m_inputUriMap.Add(inputUri, inputNode);
         }
         DLinqQueryNode resNode = inputNode;
         if (inputNode.Table.Deserializer != null)
         {
             // Add an Apply for the deserializer
             resNode = new DLinqApplyNode(inputNode.Table.Deserializer, expression, inputNode);
         }
         return resNode;
     }
     else
     {
         string errMsg = "Can't handle expression of type " + expression.NodeType;
         throw DryadLinqException.Create(DryadLinqErrorCode.UnsupportedExpressionsType,
                                         String.Format(SR.UnsupportedExpressionsType,expression.NodeType),
                                         expression);
     }
 }