We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Before:
#nullable enable namespace N { using System; using System.IO; using System.Threading.Tasks; public class C : IAsyncDisposable { ↓private readonly IAsyncDisposable? disposable = File.OpenRead(string.Empty); public ValueTask DisposeAsync() { return default(ValueTask); } } }
Not sure how we should generate the null check. Only offering fix when notnull for now. Nullable case is likely rare.
The text was updated successfully, but these errors were encountered:
Nullable case is likely rare.
I have a lot of them :)
I spawn a process in a StartAsync() method, but my process is null before reaching StartAsync(), which made me do this:
if(this._process !=null) { await this._process.DisposeAsync(); }
It might not be thread-safe, but for my use case it's ok.
A safer way might be to use Interlocked.Exchange()
Sorry, something went wrong.
No branches or pull requests
Before:
Not sure how we should generate the null check.
Only offering fix when notnull for now. Nullable case is likely rare.
The text was updated successfully, but these errors were encountered: