ReplaceIn Class

Summary

Replaces a search string in the specified content with the content of input documents.
Assembly
Wyam.Core.dll
Namespace
Wyam.Core.Modules.Contents
Interfaces
Base Types
graph BT Type-->Base0["ContentModule"] click Base0 "/api/Wyam.Common.Modules/ContentModule" Base0-->Base1["Object"] Type-.->Interface0["IModule"] click Interface0 "/api/Wyam.Common.Modules/IModule" Type["ReplaceIn"] class Type type-node

Syntax

public class ReplaceIn : ContentModule, IModule

Remarks

This is sort of like the inverse of the Replace module and is very useful for simple template substitution.

Constructors

Name Summary
ReplaceIn(string, ContextConfig) Replaces all occurrences of the search string in the string value of the returned object with the content of each input document. This allows you to specify different content depending on the execution context.
ReplaceIn(string, DocumentConfig) Replaces all occurrences of the search string in the string value of the returned object with the content of each input document. This allows you to specify different content for each document depending on the input document.
ReplaceIn(string, IModule[]) The specified modules are executed against an empty initial document and all occurrences of the search string in the resulting document content are replaced by the content of each input document (possibly creating more than one output document for each input document).
ReplaceIn(string, Object) Replaces all occurrences of the search string in the string value of the specified object with the content of each input document.

Methods

Name Value Summary
Execute(IReadOnlyList<IDocument>, IExecutionContext) IEnumerable<IDocument>
This should not be called directly, instead call IExecutionContext.Execute() if you need to execute a module from within another module.
Inherited from ContentModule
Execute(Object, IDocument, IExecutionContext) IEnumerable<IDocument>
Executes the module with the specified content against a single document. Note that content can be passed in as null, implementers should guard against that.
IsRegex(RegexOptions) ReplaceIn
Indicates that the search string(s) should be treated as a regular expression(s) with the specified options.
GitHub