Example #1
0
 public override void Visit(RelPropertyOp op, Node n)
 {
     using (new AutoString(this, op)) {
         VisitChildren(n);
         WriteString(".NAVIGATE(");
         WriteString(op.PropertyInfo.Relationship.Name);
         WriteString(",");
         WriteString(op.PropertyInfo.FromEnd.Name);
         WriteString(",");
         WriteString(op.PropertyInfo.ToEnd.Name);
         WriteString(")");
     }
 }
 /// <summary>
 /// RelPropertyOp handling.
 /// Delegates to VisitPropertyOp. Marks the rel-property as required from the
 /// child
 /// </summary>
 /// <param name="op">the RelPropertyOp</param>
 /// <param name="n">node tree corresponding to the op</param>
 public override void Visit(RelPropertyOp op, Node n)
 {
     VisitPropertyOp(op, n, new RelPropertyRef(op.PropertyInfo));
 }
 /// <summary>
 ///     RelPropertyOp. Pick out the appropriate property from the child
 /// </summary>
 /// <param name="op"> </param>
 /// <param name="n"> </param>
 /// <returns> </returns>
 public override Node Visit(RelPropertyOp op, Node n)
 {
     // DevDiv #7246: When the underlying source is "OF TYPE ONLY" query, the view does not have the
     // rel properties for the subtypes. However, relationship span may try to navigate to these properties, 
     // thus we need to ignore them (i.e. the nulls are produced)
     return VisitPropertyOp(op, n, new RelPropertyRef(op.PropertyInfo), throwIfMissing: false);
 }
 public override void Visit(RelPropertyOp op, Node n)
 {
     VisitScalarOpDefault(op, n);
     Assert(m_command.IsRelPropertyReferenced(op.PropertyInfo), "no such rel property:", op.PropertyInfo);
     Assert(
         TypeSemantics.IsEntityType(n.Child0.Op.Type), "argument to RelPropertyOp must be an entity type. Found: ", n.Child0.Op.Type);
 }
Example #5
0
 /// <summary>
 /// Copies a RelPropertyOp
 /// </summary>
 /// <param name="op">the RelPropertyOp to copy</param>
 /// <param name="n">node tree corresponding to 'op'</param>
 /// <returns>a copy of the node tree</returns>
 public override Node Visit(RelPropertyOp op, Node n)
 {
     return(CopyDefault(m_destCmd.CreateRelPropertyOp(op.PropertyInfo), n));
 }
 /// <summary>
 ///     Visitor pattern method for RelPropertyOp
 /// </summary>
 /// <param name="op"> The RelPropertyOp being visited </param>
 /// <param name="n"> The Node that references the Op </param>
 public virtual void Visit(RelPropertyOp op, Node n)
 {
     VisitScalarOpDefault(op, n);
 }
 /// <summary>
 ///     RelPropertyOp handling.
 ///     Delegates to VisitPropertyOp. Marks the rel-property as required from the
 ///     child
 /// </summary>
 /// <param name="op"> the RelPropertyOp </param>
 /// <param name="n"> node tree corresponding to the op </param>
 public override void Visit(RelPropertyOp op, Node n)
 {
     VisitPropertyOp(op, n, new RelPropertyRef(op.PropertyInfo));
 }
Example #8
0
 // <summary>
 // Copies a RelPropertyOp
 // </summary>
 // <param name="op"> the RelPropertyOp to copy </param>
 // <param name="n"> node tree corresponding to 'op' </param>
 // <returns> a copy of the node tree </returns>
 public override Node Visit(RelPropertyOp op, Node n)
 {
     return CopyDefault(m_destCmd.CreateRelPropertyOp(op.PropertyInfo), n);
 }
Example #9
0
 public override void Visit(RelPropertyOp op, Node n)
 {
     VisitScalarOpDefault(op, n);
     Assert(m_command.IsRelPropertyReferenced(op.PropertyInfo), "no such rel property:", op.PropertyInfo);
     Assert(TypeSemantics.IsEntityType(n.Child0.Op.Type), "argument to RelPropertyOp must be an entity type. Found: ", n.Child0.Op.Type);
 }
Example #10
0
 public override void Visit(RelPropertyOp op, System.Data.Entity.Core.Query.InternalTrees.Node n)
 {
     this.VisitPropertyOp((Op)op, n, (PropertyRef) new RelPropertyRef(op.PropertyInfo));
 }