A content provider that uses a delegate to get the stream.
- Namespace
- Statiq
.Common - Interfaces
- Base Types
-
- object
Syntax
public class DelegateContent : IContentProvider, ICacheCode
Constructors
Properties
Name | Property Type | Summary |
---|---|---|
MediaType | string |
Gets the media type of the content.
|
Methods
Name | Return Value | Summary |
---|---|---|
CloneWithMediaType |
IContentProvider | |
GetCacheCodeAsync |
Task |
Gets a deterministic hash appropriate for caching.
|
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.
|