Class Cs.QueryBody

java.lang.Object
org.openrewrite.csharp.tree.Cs.QueryBody
All Implemented Interfaces:
Cs, org.openrewrite.java.tree.J, org.openrewrite.Tree
Enclosing interface:
Cs

public static final class Cs.QueryBody extends Object implements Cs
Represents the body of a LINQ query expression, consisting of the query clauses and a final select or group clause.

For example:

     // Body of query includes everything after initial 'from':
     from c in customers
     where c.Age > 18       // Clauses part
     orderby c.LastName     // Clauses part
     select c.Name          // SelectOrGroup part
     into oldCustomers      // Continuation part
     where oldCustomers...

     // Another example with join:
     from o in orders
     join c in customers    // Clauses part
         on o.CustomerId equals c.Id
     where o.Total > 1000   // Clauses part
     select new { o, c }    // SelectOrGroup part
 
  • Constructor Details

    • QueryBody

      public QueryBody()
  • Method Details

    • acceptCSharp

      public <P> org.openrewrite.java.tree.J acceptCSharp(CSharpVisitor<P> v, P p)
      Specified by:
      acceptCSharp in interface Cs