Potential `NullReferenceException` at runtime
In ToAsyncEnumerable you've checked for null in:
https://github.com/i3arnon/MongoAsyncEnumerableAdapter/blob/8539306221b4cfba0d77ba6589693a32d71a992e/src/MongoAsyncEnumerableAdapter/AsyncCursorExtensions.cs#L34
but that check won't get executed in Release builds. Which means in production you'll get a NullReferenceException from the ! in this line:
https://github.com/i3arnon/MongoAsyncEnumerableAdapter/blob/8539306221b4cfba0d77ba6589693a32d71a992e/src/MongoAsyncEnumerableAdapter/AsyncCursorExtensions.cs#L36
You should always check for null at runtime and never use the ! operator.
The C# compiler is quite smart at figuring out when things can't be null. If you ever need to use the ! operator, there's a strong chance you've made a mistake somewhere and might get a NullReferenceException at runtime.
there's a strong chance you've made a mistake somewhere
So did I?