Class Cs.Yield

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

public static final class Cs.Yield extends Object implements Cs, org.openrewrite.java.tree.Statement
Represents a C# yield statement which can either return a value or break from an iterator.

For example:

   yield return value;   // Returns next value in iterator
   yield break;          // Signals end of iteration
 
  • Constructor Details

    • Yield

      public Yield()
  • Method Details

    • acceptCSharp

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

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