CustomDocumentFactory<T> Class

Summary

Responsible for creating new document instances.
Assembly
Wyam.Core.dll
Namespace
Wyam.Core.Documents
Interfaces
Base Types
  • Object
graph BT Type-->Base0["Object"] Type-.->Interface0["IDocumentFactory"] click Interface0 "/api/Wyam.Common.Documents/IDocumentFactory" Type["CustomDocumentFactory<T>"] class Type type-node

Syntax

public class CustomDocumentFactory<T> : IDocumentFactory where T : CustomDocument, new()

Type Parameters

Name Description
T

Constructors

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).
GetDocument(IExecutionContext, IDocument, string, IEnumerable<KeyValuePair<string, Object>>) IDocument
GitHub