Returns all documents that contain the specified metadata key.
- Namespace
- Statiq
.Common - Containing Type
- I
Document Enumerable Extensions
Syntax
public static DocumentList<TDocument> WhereContainsKey<TDocument>(this IEnumerable<TDocument> documents, string metadataKey)
where TDocument : IDocument
Type Parameters
Name | Description |
---|---|
TDocument | The document type. |
Parameters
Name | Type | Description |
---|---|---|
documents | IEnumerable |
The documents. |
metadataKey | string | The key. |
Return Value
Type | Description |
---|---|
DocumentList |
All documents that contain the specified metadata key. |