* Read interface IList.Count once rather than per iteration Inspired by #9962, read .Count once rather than once per loop iteration. * Use nameof() instead of ToString() Use constant nameof() on enum value, rather than runtime ToString(). * Right-size dictionary Initialize dictionary with a fixed number of elements to the number of elements it contains. * Use DisposeAsync() Use DisposeAsync() on FileBufferingReadStream in input formatters. * Override DisposeAsync() Override DisposeAsync() to call DisposeAsync() on the inner stream. * Use GetValueOrDefault() for content-length Use GetValueOrDefault() to read the content length once instead of checking HasValue once and Value up to three times. * Update Microsoft.AspNetCore.WebUtilities.netcoreapp3.0.cs Add DisposeAsync(). * Use DisposeAsync() Use DisposeAsync() on transcoding streams as other formatters do. |
||
|---|---|---|
| .. | ||
| ref | ||
| src | ||
| test | ||