Use Task.Run for immediately awaited string Func APM calls
ProprietaryOpt-in port of a closed fresh Func<string,string,bool> local immediately joined through EndInvoke(BeginInvoke(first,second,null,null)). A private synchronous helper captures the delegate and arguments before scheduling, then uses GetAwaiter().GetResult() to retain the Boolean result and direct exception propagation. Adopt Task scheduling and execution-context behavior. Exclude callbacks/state, escapes, reassignment, other signatures, lambdas/queries, partial/generic owners, comments and conditional snapshots. Not composed into version upgrades.
OpenRewrite. Recipes. CSharp. Migration. Dotnet. Net3_0. UseTaskRunForImmediateStringFuncEndInvokemod run . --recipe= OpenRewrite. Recipes. CSharp. Migration. Dotnet. Net3_0. UseTaskRunForImmediateStringFuncEndInvokeInstall it once, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.