Throw an exception if examined < consumed and reworked lastExamined (dotnet/corefx...
authorDavid Fowler <davidfowl@gmail.com>
Mon, 11 Mar 2019 21:35:27 +0000 (14:35 -0700)
committerGitHub <noreply@github.com>
Mon, 11 Mar 2019 21:35:27 +0000 (14:35 -0700)
commit70a84e9b211efae8003b814b75363958e1277600
tree1d412cd4330684719cd8091b8280e8bbb1ecbfff
parentc13af4ec0007c34f52c75bb6ff2466a1c7c6db65
Throw an exception if examined < consumed and reworked lastExamined (dotnet/corefx#35879)

- Store a single absolute position instead of the segment
- Fixed some typos and added tests for null segments
- Added more tests

Commit migrated from https://github.com/dotnet/corefx/commit/203bc37eddbae8fb14531d305554a662c0428279
src/libraries/System.IO.Pipelines/src/Resources/Strings.resx
src/libraries/System.IO.Pipelines/src/System/IO/Pipelines/Pipe.cs
src/libraries/System.IO.Pipelines/src/System/IO/Pipelines/ThrowHelper.cs
src/libraries/System.IO.Pipelines/tests/PipeLengthTests.cs