Use Task.Run with capture for ignored Action APM calls
ProprietaryBroader opt-in port of ignored bound parameterless Action.BeginInvoke(null,null) statements. A private void helper captures any receiver immediately, preserves its failures and a captured null delegate's immediate NullReferenceException, then schedules Task.Run(action). Adopt Task scheduling, child-task and unobserved-exception behavior. Leave callback/state/observed/named calls, other delegate signatures, lambda/query bodies, partial/generic owners, discarded comments and snapshots unchanged. Separate from version upgrades and the stricter fresh/local Action recipe.
OpenRewrite. Recipes. CSharp. Migration. Dotnet. Net3_0. UseTaskRunForCapturedActionBeginInvokemod run . --recipe= OpenRewrite. Recipes. CSharp. Migration. Dotnet. Net3_0. UseTaskRunForCapturedActionBeginInvokeInstall it once, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.