Use Task.Run with capture for ignored custom delegate APM calls

Proprietary

Broader opt-in port of ignored bound non-generic parameterless void delegate BeginInvoke(null,null) statements. A private helper typed to the original delegate captures any receiver immediately, preserves receiver/null failures, then schedules Task.Run(() => action.Invoke()). Adopt Task scheduling, child-task and unobserved-exception behavior and additional helper/closure frames. Leave Action to its companion, callbacks/state/observed/named calls, generic/parameterized/value-returning delegates, lambda/query bodies, partial/generic owners, discarded comments and snapshots unchanged. Separate from version upgrades and the stricter closed-local delegate recipe.

OpenRewrite.Recipes.CSharp.Migration.Dotnet.Net3_0.UseTaskRunForCapturedDelegateBeginInvoke
mod run . --recipe=OpenRewrite.Recipes.CSharp.Migration.Dotnet.Net3_0.UseTaskRunForCapturedDelegateBeginInvoke

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