- Namespace
- Statiq
.Common - Base Types
-
- object
graph BT
Type-->Base0["object"]
Type["IDocumentExtensions"]
class Type type-node
Syntax
public static class IDocumentExtensions
Methods
Name | Return Value | Summary |
---|---|---|
AsDynamic |
dynamic |
Presents the metadata of a document as a dynamic object. Cast the return object to
IDocument
to convert it back to a document.
static
|
GetContentBytesAsync |
Task |
Gets the content associated with this document as a byte array.
This will result in reading the entire content stream.
It's preferred to read directly as a stream using
GetContentStream(IDocument) if possible.
static
|
GetContentStream |
Stream |
Gets the content associated with this document as a
Stream .
The stream you get from this call must be disposed as soon as reading is complete.
static
|
Get |
Task |
Gets the content associated with this document as a string.
This will result in reading the entire content stream.
It's preferred to read directly as a stream using
GetContentStream(IDocument) if possible.
static
|
GetContentTextReader |
TextReader |
Gets the content associated with this document as a
TextReader . This is prefered
over reading the stream as text since it might be optimized for text-based use cases.
The TextReader you get from this call must be disposed as soon as reading is complete.
static
|
GetTitle |
string |
Gets a normalized title derived from the document source (or
Title if defined).
static
|
IdEquals |
bool |
Determines if a document is equal by comparing their IDs.
static
|
IdEquals |
bool |
Determines if a document is equal by comparing their IDs.
static
|
MediaTypeEquals |
bool |
Determines if the supplied media type equals the media type of the content.
static
|