Gets the value for the specified key converted to a
DocumentList<TDocument>
. This method never throws an exception.
It will return an empty list if the key is not found or if the key is found but contains no items that can be converted to IDocument
.
- Namespace
- Statiq
.Common - Containing Type
- I
Metadata Conversion Extensions
Syntax
public static DocumentList<IDocument> GetDocumentList(this IMetadata metadata, string key)
Parameters
Name | Type | Description |
---|---|---|
metadata | IMetadata | The metadata instance. |
key | string | The key of the documents to get. |
Return Value
Type | Description |
---|---|
DocumentList |
The value for the specified key converted to a list or null. |