Class Cs.FromClause

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

public static final class Cs.FromClause extends Object implements Cs, Cs.QueryClause, org.openrewrite.java.tree.Expression
Represents a LINQ from clause that introduces a range variable and its source collection. This is typically the initial clause of a LINQ query.

For example:

     // Simple from clause
     from user in users

     // With type
     from Customer c in customers

     // With pattern match
     from (x, y) in points

     // With type and pattern
     from (int x, int y) in coordinates
 
  • Constructor Details

    • FromClause

      public FromClause()
  • Method Details

    • getIdentifier

      public org.openrewrite.java.tree.Expression getIdentifier()
    • withIdentifier

      public Cs.FromClause withIdentifier(org.openrewrite.java.tree.J.Identifier identifier)
    • acceptCSharp

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

      public Cs.FromClause.Padding getPadding()
    • getType

      public @Nullable org.openrewrite.java.tree.JavaType getType()
      Specified by:
      getType in interface org.openrewrite.java.tree.Expression
    • withType

      public Cs.FromClause withType(@Nullable org.openrewrite.java.tree.JavaType type)
      Specified by:
      withType in interface org.openrewrite.java.tree.Expression
    • getCoordinates

      public org.openrewrite.java.tree.CoordinateBuilder.Expression getCoordinates()
      Specified by:
      getCoordinates in interface org.openrewrite.java.tree.Expression