Skip to content

C#: Add Preconditions.Not, And, and recipe-based Check support#7348

Merged
macsux merged 1 commit intomainfrom
macsux/csharp-ptml
Apr 10, 2026
Merged

C#: Add Preconditions.Not, And, and recipe-based Check support#7348
macsux merged 1 commit intomainfrom
macsux/csharp-ptml

Conversation

@macsux
Copy link
Copy Markdown
Contributor

@macsux macsux commented Apr 10, 2026

Summary

  • Add RecipeCheck, NotVisitor, and AndVisitor classes to support recipe-based precondition checks, negation, and AND composition in C#
  • Add corresponding Preconditions.Check(Recipe, ...), Preconditions.Not(...), and Preconditions.And(...) static methods
  • Widen SearchResult.Found<T> generic constraint from where T : J to where T : Tree to support non-Java tree types
  • Add PreconditionsTest covering Check, Not, And, and recipe-based Check scenarios

Test plan

  • New PreconditionsTest class with tests for all new precondition combinators
  • dotnet build succeeds

@github-project-automation github-project-automation Bot moved this to In Progress in OpenRewrite Apr 10, 2026
@macsux macsux merged commit 41f78a2 into main Apr 10, 2026
1 check passed
@macsux macsux deleted the macsux/csharp-ptml branch April 10, 2026 23:01
@github-project-automation github-project-automation Bot moved this from In Progress to Done in OpenRewrite Apr 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

1 participant