IContentProvider Interface
Contains the content for a document.
graph BT Type-.->Interface0["ICacheCode"] click Interface0 "/api/Statiq.Common/ICacheCode" Type["IContentProvider"] class Type type-node Implementing0["StringContent"]-.->Type click Implementing0 "/api/Statiq.Common/StringContent" Implementing1["MemoryContent"]-.->Type click Implementing1 "/api/Statiq.Common/MemoryContent" Implementing2["FileContent"]-.->Type click Implementing2 "/api/Statiq.Common/FileContent" Implementing3["StreamContent"]-.->Type click Implementing3 "/api/Statiq.Common/StreamContent" Implementing4["NullContent"]-.->Type click Implementing4 "/api/Statiq.Common/NullContent" Implementing5["DelegateContent"]-.->Type click Implementing5 "/api/Statiq.Common/DelegateContent"


public interface IContentProvider : ICacheCode


Name Property Type Summary
MediaType string
Gets the media type of the content.


Name Return Value Summary
CloneWithMediaType(string) IContentProvider
Clones the current content provider with a new media type.
GetLength() long
Gets the length of the content in bytes.
GetStream() Stream
Gets the content stream. The returned stream should be disposed after use.
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