Summary
All of the information that represents a given build. Also implements
Wyam.Common.Meta.IMetadata
to expose the global metadata.
- Assembly
- Wyam
.Common .dll - Namespace
- Wyam
.Common .Execution - Interfaces
-
- IMetadata
- IReadOnlyDictionary
<string, Object>
- Implementing Types
graph BT
Type-.->Interface0["IMetadata"]
click Interface0 "/api/Wyam.Common.Meta/IMetadata"
Type-.->Interface1["IReadOnlyDictionary<string, Object>"]
Type["IExecutionContext"]
class Type type-node
Implementing0["TestExecutionContext"]-.->Type
click Implementing0 "/api/Wyam.Testing.Execution/TestExecutionContext"
Syntax
public interface IExecutionContext : IMetadata, IReadOnlyDictionary<string, Object>
Properties
Name | Value | Summary |
---|---|---|
ApplicationInput | string |
Gets any input that was passed to the application (for example, on stdin via piping).
|
Documents | IDocumentCollection |
Gets the collection of all previously processed documents.
|
DynamicAssemblies | IReadOnlyCollection |
Gets the raw bytes for dynamically compiled assemblies (such as the configuration script).
|
ExecutionCache | IExecutionCache |
Gets the current execution cache. Modules can use the cache to store data between executions.
|
ExecutionId | Guid |
Uniquly identifies the current execution cycle. This can be used to initialize and/or
reset static data for a module on new generations (I.e., due to watching).
For example, cache data could be cleared when this changes between runs.
|
FileSystem | IReadOnlyFileSystem |
Gets the current file system.
|
Module | IModule |
Gets the currently executing module.
|
Namespaces | IReadOnlyCollection |
Gets a set of namespaces that should be brought into scope for modules that perform dynamic compilation.
|
Pipeline | IReadOnlyPipeline |
Gets the currently executing pipeline.
|
Settings | IReadOnlySettings |
Gets the current settings metadata.
|
Shortcodes | I |
Gets the available shortcodes.
|
Methods
Name | Value | Summary |
---|---|---|
CreateHttpClient |
HttpClient |
Creates a
System.Net.Http.HttpClient instance that should be used for all HTTP communication.
|
CreateHttpClient |
HttpClient |
Creates a new
System.Net.Http.HttpClient instance that uses a custom message handler.
|
Execute |
IReadOnlyList |
Executes the specified modules with the specified input documents and returns the result documents.
|
Execute |
IReadOnlyList |
Executes the specified modules with an empty initial input document with optional additional metadata and returns the result documents.
|
Execute |
IReadOnlyList |
Executes the specified modules with an empty initial input document with optional additional metadata and returns the result documents.
|
GetContentStream |
Stream |
Gets a
System.IO.Stream that can be used for document content. If content
is not null, the stream is initialized with the specified content. It is prefered to use
this method to obtain a stream over creating your own if the source of the content does
not already provide one. The returned streams are optimized for memory usage and performance.
|
GetDocument |
IDocument |
Gets a new document with default initial metadata.
|
GetDocument |
IDocument |
Gets a new document with the specified source and metadata (in addition to the default initial metadata).
|
GetDocument |
IDocument |
Gets a new document with the specified source, content stream, and metadata (in addition to the default initial metadata).
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 |
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 |
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 |
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 |
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 |
IDocument |
Gets a new document with the specified metadata (in addition to the default initial metadata).
|
GetDocument |
IDocument |
Gets a new document with the specified content stream and metadata (in addition to the default initial metadata).
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 ).
|
Get |
I |
Gets a new
Wyam.Common.JavaScript.IJavaScriptEnginePool . The returned engine pool should be disposed
when no longer needed.
|
GetShortcodeResult |
IShortcodeResult |
A factory method for use from inside an
Wyam.Common.Shortcodes.IShortcode to create an Wyam.Common.Shortcodes.IShortcodeResult .
|
GetShortcodeResult |
IShortcodeResult |
A factory method for use from inside an
Wyam.Common.Shortcodes.IShortcode to create an Wyam.Common.Shortcodes.IShortcodeResult .
|
TryConvert |
bool |
Provides access to the same enhanced type conversion used to convert metadata types.
|
Extension Methods
Name | Value | Summary |
---|---|---|
ForEach |
void |
If an exception is thrown within the action, an error messages will be sent to the trace output
containing information about the document source, the current module, and the exception message.
The exception will also be re-thrown once the message has been sent to the trace listeners.
|
Generate |
string |
Generates links to each heading on a page and returns a string containing all of the links.
From Extensions
|
Get |
CultureInfo |
Gets the
System.Globalization.CultureInfo for the date display culture.
|
Get |
CultureInfo |
Gets the
System.Globalization.CultureInfo for the date input culture.
|
GetLink |
string |
Gets a link for the root of the site using the host and root path specified in the settings.
From LinkExtensions
|
GetLink |
string |
Gets a link for the specified metadata (typically a document) using the
"RelativeFilePath" metadata value and the default settings from the
Wyam.Common.Configuration.IReadOnlySettings . This version should be used inside modules to ensure
consistent link generation. Note that you can optionally include the host or not depending
on if you want to generate host-specific links. By default, the host is not included so that
sites work the same on any server including the preview server.
From LinkExtensions
|
GetLink |
string |
Gets a link for the specified metadata (typically a document) using the
specified metadata value (by default, "RelativeFilePath") and the default settings from the
Wyam.Common.Configuration.IReadOnlySettings . This version should be used inside modules to ensure
consistent link generation. Note that you can optionally include the host or not depending
on if you want to generate host-specific links. By default, the host is not included so that
sites work the same on any server including the preview server.
From LinkExtensions
|
GetLink |
string |
Converts the specified path into a string appropriate for use as a link using default settings from the
Wyam.Common.Configuration.IReadOnlySettings . This version should be used inside modules to ensure
consistent link generation. Note that you can optionally include the host or not depending
on if you want to generate host-specific links. By default, the host is not included so that
sites work the same on any server including the preview server.
From LinkExtensions
|
GetLink |
string |
Converts the path into a string appropriate for use as a link, overriding one or more
settings from the
Wyam.Common.Configuration.IReadOnlySettings .
From LinkExtensions
|
GetLink |
string |
Converts the path into a string appropriate for use as a link, overriding one or more
settings from the
Wyam.Common.Configuration.IReadOnlySettings .
From LinkExtensions
|
GetLink |
string |
Converts the specified path into a string appropriate for use as a link using default settings from the
Wyam.Common.Configuration.IReadOnlySettings . This version should be used inside modules to ensure
consistent link generation. Note that you can optionally include the host or not depending
on if you want to generate host-specific links. By default, the host is not included so that
sites work the same on any server including the preview server.
From LinkExtensions
|
GetLink |
string |
Converts the path into a string appropriate for use as a link, overriding one or more
settings from the
Wyam.Common.Configuration.IReadOnlySettings .
From LinkExtensions
|
GetTypeLink |
HtmlString |
From Extensions
|
GetTypeLink |
HtmlString |
From Extensions
|
GetTypeLink |
HtmlString |
From Extensions
|
GetTypeLink |
HtmlString |
From Extensions
|
ParallelForEach |
void |
If an exception is thrown within the action, an error messages will be sent to the trace output
containing information about the document source, the current module, and the exception message.
The exception will also be re-thrown once the message has been sent to the trace listeners.
|
TraceExceptions |
void |
If an exception is thrown within the action, an error messages will be sent to the trace output
containing information about the current module and the exception message.
The exception will also be re-thrown once the message has been sent to the trace listeners.
|
TraceExceptions |
void |
If an exception is thrown within the action, an error messages will be sent to the trace output
containing information about the document source, the current module, and the exception message.
The exception will also be re-thrown once the message has been sent to the trace listeners.
|
TraceExceptions |
TResult |
If an exception is thrown within the action, an error messages will be sent to the trace output
containing information about the current module and the exception message.
The exception will also be re-thrown once the message has been sent to the trace listeners.
|
TraceExceptions |
TResult |
If an exception is thrown within the action, an error messages will be sent to the trace output
containing information about the document source, the current module, and the exception message.
The exception will also be re-thrown once the message has been sent to the trace listeners.
|
Try |
bool |
Attempts to parse and input date using the input date culture setting.
|