IDocumentFactory Interface

Summary

Responsible for creating new document instances.
Assembly
Wyam.Common.dll
Namespace
Wyam.Common.Documents
Implementing Types
graph BT Type["IDocumentFactory"] class Type type-node Implementing0["CustomDocumentFactory<T>"]-.->Type click Implementing0 "/api/Wyam.Core.Documents/CustomDocumentFactory_1"

Syntax

public interface IDocumentFactory

Methods

Name Value Summary
GetDocument(IExecutionContext) IDocument
Gets a new document with default initial metadata.
GetDocument(IExecutionContext, IDocument, FilePath, IEnumerable<KeyValuePair<string, Object>>) IDocument
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.
GetDocument(IExecutionContext, IDocument, FilePath, Stream, IEnumerable<KeyValuePair<string, Object>>, bool) IDocument
Clones the specified source document with a new source, new content stream, 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. If disposeStream is true (which it is by default), the provided System.IO.Stream will automatically be disposed when the document is disposed (I.e., the document takes ownership of the System.IO.Stream).
GetDocument(IExecutionContext, IDocument, IEnumerable<KeyValuePair<string, Object>>) IDocument
Clones the specified source document with identical content 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.
GetDocument(IExecutionContext, IDocument, Stream, IEnumerable<KeyValuePair<string, Object>>, bool) IDocument
Clones the specified source document with a new content stream, 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. If disposeStream is true (which it is by default), the provided System.IO.Stream will automatically be disposed when the document is disposed (I.e., the document takes ownership of the System.IO.Stream).
GitHub