to read bytes as this allows us to start reading from the current
position. In Read, return 0 when reading beyond the end of the stream
and only read bytes until the end of the stream (not capacity).
In ReadByte, return -1 when reading beyond the end of the stream.
In SetLength: changed argument validation (and reported exceptions) to
match MS, removed duplicate access check and changed the current
position if length is less than position. In Write: throw
NotSupportedException when attempting to write beyond capacity, use
Marshal.WriteByte since that allows us to start writing from the
current position. Adjust length when position moves beyond length
in both Write and WriteByte. Allow position to be moved beyond
capacity of stream. Fixed position using Seek (=+ typo). Changed
CanRead to ignore current position. Allow Position to be used to move
beyond capacity of stream.
* UnmanagedMemoryStreamTest.cs: Added tests for CanRead, CanSeek,
CanWrite, Seek, Write. Improved existing tests for SetLength,
Position. Enabled tests that were previously failing.
svn path=/trunk/mcs/; revision=77972
more. Tests were previously ignored by NUnit because the SetUp method
was private.
* UnmanagedMemoryStream.cs: Changed argument names and exceptions
(msg, params) to match MS. Verify access argument in ctor.
svn path=/trunk/mcs/; revision=77894
* UnmanagedMemoryStream.cs: Should not have a public Dispose().
This behaviour is already provided by the base class.
svn path=/trunk/mcs/; revision=75324