Defines common cross-platform macros, export decorators, and fundamental types.
#define DOTNETDUPE_API
Platform-specific linkage decoration for exporting or importing library symbols.
The exception that is thrown when an I/O error occurs.
void Flush() override
Clears all buffers for this stream.
int Read(char *pBuffer, int iOffset, int iCount) override
Reads a sequence of bytes from the current stream.
long Seek(long lOffset, int iOrigin) override
Sets the position within the current stream.
bool CanSeek() const override
Gets a value indicating whether the current stream supports seeking.
void Dispose() override
Closes and releases all resources associated with the stream.
void Write(const char *pBuffer, int iOffset, int iCount) override
Writes a sequence of bytes to the current stream.
void SetCanSeek(bool bCanSeek)
Sets whether seeking is supported.
void SetCanWrite(bool bCanWrite)
Sets whether write operations are supported.
void SetCanRead(bool bCanRead)
Sets whether read operations are supported.
long GetLength() const override
Gets the length in bytes of the stream.
bool IsDisposed() const
Checks whether the stream has been disposed.
void SetThrowOnRead(bool bThrow)
Configures whether future read operations throw an IOException.
void SetPosition(long lValue) override
Sets the current position within the stream.
void SetThrowOnWrite(bool bThrow)
Configures whether future write operations throw an IOException.
bool CanWrite() const override
Gets a value indicating whether the current stream supports writing.
MockStream(bool bCanRead=true, bool bCanWrite=true, bool bCanSeek=true)
Initializes a new instance of MockStream with configurable capabilities.
bool CanRead() const override
Gets a value indicating whether the current stream supports reading.
void SetLength(long lValue) override
Sets the length of the current stream.
long GetPosition() const override
Gets the current position within the stream.
Provides a generic view of a sequence of bytes.