Gets a
Stream
that can be used for document content. If content
is not null, the stream is initialized with the specified content. It is preferred to use
this method to obtain a stream over creating your own if the source of the content does
not already provide one. The returned streams are optimized for memory usage and performance.
Instances of the returned stream should be disposed when writing is complete.
- Namespace
- Statiq
.Testing - Containing Type
- TestEngine
- Implements
Syntax
public Stream GetContentStream(string content = null)
Remarks
The position is set to the beginning of the stream when returned.
Parameters
Name | Type | Description |
---|---|---|
content | string | Content to initialize the stream with. |
Return Value
Type | Description |
---|---|
Stream | A stream for document content. |