Preserve Enumerable.Contains binding for arrays and strings

Proprietary

Make originally resolved reduced Enumerable.Contains calls on arrays or strings explicit before retargeting. Preserve LINQ null-receiver exceptions, equality semantics and query-provider method identity when newer span or instance methods would bind instead. Receiver and value remain evaluated once in their original order. Retain explicit generic arguments, comparer overloads, custom/static calls, comments and conditional snapshots.

OpenRewrite.Recipes.CSharp.Migration.Dotnet.Net10.PreserveEnumerableContainsBinding
mod run . --recipe=OpenRewrite.Recipes.CSharp.Migration.Dotnet.Net10.PreserveEnumerableContainsBinding

Install it once, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.