StreamContent Class
A content provider that wraps a seekable stream.
Base Types
graph BT Type-->Base0["LockingStreamWrapper"] click Base0 "/api/Statiq.Common/LockingStreamWrapper" Base0-->Base1["object"] Type-.->Interface0["IDisposable"] Type-.->Interface1["IContentProvider"] click Interface1 "/api/Statiq.Common/IContentProvider" Type-.->Interface2["ICacheCode"] click Interface2 "/api/Statiq.Common/ICacheCode" Type["StreamContent"] class Type type-node


public class StreamContent : LockingStreamWrapper, IDisposable, IContentProvider, ICacheCode



Name Property Type Summary
MediaType string
Gets the media type of the content.
Stream Stream
Inherited from LockingStreamWrapper


Name Return Value Summary
CloneWithMediaType(string) IContentProvider
Clones the current content provider with a new media type.
Dispose() void
Inherited from LockingStreamWrapper
GetCacheCodeAsync() Task<int>
Gets a deterministic hash appropriate for caching.
GetLength() long
Gets the length of the wrapped stream without locking it.
Inherited from LockingStreamWrapper
GetStream() Stream
Gets the wrapped stream and locks access until it's disposed. The returned stream should be disposed after use as soon as possible.
Inherited from LockingStreamWrapper
GetTextReader() TextReader
Gets an appropriate TextReader for the content. This is prefered over reading the stream as text since it might be optimized for text-based use cases. The returned TextReader should be disposed after use.

Extension Methods