Use byte arrays for closed SOAP hex locals
ProprietaryReplace constructor-initialized method-local SoapHexBinary wrappers only when all references are attributed Value reads or parameterless ToString calls. Capture the same byte-array reference at the original declaration, retain alias mutations, and format with Convert.ToHexString only where ToString was called, preserving its null exception timing. Parsing, writes, escapes, captures/query expressions, nameof and unresolved flows remain for review. Targets .NET 5+.
OpenRewrite. Recipes. CSharp. Migration. Dotnet. Net5. UseByteArraysForSoapHexBinaryLocalsmod run . --recipe= OpenRewrite. Recipes. CSharp. Migration. Dotnet. Net5. UseByteArraysForSoapHexBinaryLocalsInstall it once, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.