dotnet / roslyn-analyzers

MIT License
1.58k stars 464 forks source link

New analyzer: Do not call BeginInvoke on a delegate for .NET Core #2807

Open sharwell opened 5 years ago

sharwell commented 5 years ago

This would apply to projects targeting .NET Standard or .NET Core.

https://github.com/dotnet/corefx/issues/5940 https://github.com/dotnet/runtime/issues/16312 https://github.com/dotnet/winforms/issues/1548

danmoseley commented 1 year ago

Or EndInvoke, right?

sharwell commented 1 year ago

@danmoseley I wouldn't expect users to continue calling EndInvoke after the calls to BeginInvoke were removed. Isn't the return value from BeginInvoke one of the arguments to EndInvoke?

LunarWhisper commented 6 months ago

@danmoseley I wouldn't expect users to continue calling EndInvoke after the calls to BeginInvoke were removed. Isn't the return value from BeginInvoke one of the arguments to EndInvoke?

Task implements IAsyncResult so we need to check EndInvoke too.