IDocumentFactory.

GetDocument(IExecutionContext, IDocument, FilePath, IEnumerable<KeyValuePair<string, Object>>) Method

Summary

Clones the specified source document with a new source and additional metadata (all existing metadata is retained) or gets a new document if the source document is null or AsNewDocuments() was called on the module.
Assembly
Wyam.Common.dll
Namespace
Wyam.Common.Documents
Containing Type
IDocumentFactory

Syntax

IDocument GetDocument(IExecutionContext context, IDocument sourceDocument, FilePath source, IEnumerable<KeyValuePair<string, Object>> items = null)

Parameters

Name Type Description
context IExecutionContext The current execution context.
sourceDocument IDocument The source document.
source FilePath The source (if the source document contains a source, then this is ignored and the source document's source is used instead).
items IEnumerable<KeyValuePair<string, Object>> The metadata items.

Return Value

Type Description
IDocument The cloned or new document.
GitHub