I apologize if I don't know the historical reasons why not all the methods are async. I did a quick review and wanted to share my notes. I hope some of these changes useful.
All tests pass without modification.
Prefer Task.Run over Task.Factory.StartNew
Compile in release mode with overflow checks for safety.
Implement await using when available.
Remove unused result.GetType();
CA1835: Prefer the memory-based overloads of ReadAsync/WriteAsync
Thanks! Improvements are always welcome 🚀
You mean ReadLong and WriteLong? Well they manipute few bytes so I thought its insignificant, no other reasons
I apologize if I don't know the historical reasons why not all the methods are async. I did a quick review and wanted to share my notes. I hope some of these changes useful.
All tests pass without modification.
await using
when available.result.GetType();