Contains the content for a document.
- Namespace
- Statiq
.Common - Interfaces
- Implementing Types
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"
Syntax
public interface IContentProvider : ICacheCode
Properties
Name | Property Type | Summary |
---|---|---|
MediaType | string |
Gets the media type of the content.
|
Methods
Name | Return Value | Summary |
---|---|---|
CloneWithMediaType |
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.
|