Improve accessability of Span<T> methods.#1172
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1172 +/- ##
=======================================
Coverage 82.39% 82.40%
=======================================
Files 684 684
Lines 29516 29519 +3
Branches 3327 3328 +1
=======================================
+ Hits 24319 24324 +5
+ Misses 4508 4507 -1
+ Partials 689 688 -1
Continue to review full report at Codecov.
|
| if (mg.Count > 1) | ||
| { | ||
| span = default; | ||
| return false; |
There was a problem hiding this comment.
@antonfirsov Is there a test somewhere I can tap into to test the false condition?
There was a problem hiding this comment.
Yes, you can limit MemoryAllocator's BufferCapacity in many ways to ensure the backing memory is fragmented:
- like this (works with
TestMemoryAllocatoronly). - or like this.
antonfirsov
left a comment
There was a problem hiding this comment.
Should be good after adding tests and exception docs.
| if (mg.Count > 1) | ||
| { | ||
| span = default; | ||
| return false; |
There was a problem hiding this comment.
Yes, you can limit MemoryAllocator's BufferCapacity in many ways to ensure the backing memory is fragmented:
- like this (works with
TestMemoryAllocatoronly). - or like this.
| /// at row <paramref name="rowIndex"/> beginning from the first pixel on that row. | ||
| /// </summary> | ||
| /// <param name="rowIndex">The row.</param> | ||
| /// <returns>The <see cref="Span{TPixel}"/></returns> |
There was a problem hiding this comment.
The docs are missing <exception> for ArgumentOutOfRangeException.
| /// </summary> | ||
| /// <param name="rowIndex">The row.</param> | ||
| /// <returns>The <see cref="Span{TPixel}"/></returns> | ||
| public Span<TPixel> GetPixelRowSpan(int rowIndex) |
Prerequisites
Description
Fixes #1164