Scope reviewed sequence-length input storage in scalar ref-struct constructors
ProprietaryAdd scoped to one in ReadOnlySequence<byte> constructor parameter used only for bound BCL Length reads. Require a nonpartial nongeneric ref struct with scalar/enum source fields, only scalar assignments, and closed source scalar property accessors. Other parameters must be scalar by value. Unknown calls, aliases, ref fields, source-shadowed sequence types, additional byref channels and conditional/colliding declarations stay manual. Standalone owner opt-in; never part of an upgrade composite.
OpenRewrite. Recipes. CSharp. Migration. Dotnet. Net7. ScopeInSequenceLengthRefStructConstructorsOptional
Confirm C# 11+ for ALL affected builds and consumers, genuine BCL ReadOnlySequence binding, and owner review of public constructor ScopedRef/ref-safety metadata, deployed runtime compatibility and transitive unsafe/interop boundaries. Scoped deliberately changes the metadata contract. Default false.
mod run . --recipe= OpenRewrite. Recipes. CSharp. Migration. Dotnet. Net7. ScopeInSequenceLengthRefStructConstructorsInstall it once, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.