Click or drag to resize
MimeKit

BoundStream Constructor

Initialize a new instance of the BoundStream class.

Namespace: MimeKit.IO
Assembly: MimeKit (in MimeKit.dll) Version: 4.3.0
Syntax
C#
public BoundStream(
	Stream baseStream,
	long startBoundary,
	long endBoundary,
	bool leaveOpen
)

Parameters

baseStream  Stream
The underlying stream.
startBoundary  Int64
The offset in the base stream that will mark the start of this substream.
endBoundary  Int64
The offset in the base stream that will mark the end of this substream.
leaveOpen  Boolean
true to leave the baseStream open after the BoundStream is disposed; otherwise, false.
Exceptions
ExceptionCondition
ArgumentNullExceptionbaseStream is null.
ArgumentOutOfRangeException

startBoundary is less than zero.

-or-

endBoundary is greater than or equal to zero -and- is less than startBoundary.

Remarks
If the endBoundary is less than 0, then the end of the stream is unbounded.
See Also