Port closed Boolean Func APM completion callbacks
ProprietaryOpt-in Task scheduling port of an explicit two-argument Boolean Func local used only by one ignored BeginInvoke and one EndInvoke in its inline synchronous completion callback. Require literal null state, a first EndInvoke-initialized callback local (directly or first in a try), and no other result/receiver references or callback jumps. Capture receiver/arguments/callback in order, retain the callback body and queue completion on the default Task scheduler. Carry worker exceptions as ExceptionDispatchInfo so End preserves cancellation/AggregateException identity. Skip other shapes, escapes/reassignments, named/null-conditional calls, partial/generic owners and snapshots. Adopt Task scheduling, execution-context/child-task/unobserved-callback-exception behavior and new frames; do not emulate general APM/remoting/transport/shutdown contracts. Separate from version upgrades.
OpenRewrite. Recipes. CSharp. Migration. Dotnet. Net3_0. UseTasksForClosedBooleanFuncCallbacksmod run . --recipe= OpenRewrite. Recipes. CSharp. Migration. Dotnet. Net3_0. UseTasksForClosedBooleanFuncCallbacksInstall it once, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.