The engine is the primary entry point for the generation process.
- Namespace
- Statiq
.Core - Interfaces
-
- IEngine
- IConfigurable
- IExecutionState
- IDocumentFactory
- IDisposable
- Base Types
-
- object
graph BT
Type-->Base0["object"]
Type-.->Interface0["IEngine"]
click Interface0 "/api/Statiq.Common/IEngine"
Type-.->Interface1["IConfigurable"]
click Interface1 "/api/Statiq.Common/IConfigurable"
Type-.->Interface2["IExecutionState"]
click Interface2 "/api/Statiq.Common/IExecutionState"
Type-.->Interface3["IDocumentFactory"]
click Interface3 "/api/Statiq.Common/IDocumentFactory"
Type-.->Interface4["IDisposable"]
Type["Engine"]
class Type type-node
Syntax
public class Engine : IEngine, IConfigurable, IExecutionState, IDocumentFactory, IDisposable
Constructors
Name | Summary |
---|---|
Engine |
Creates an engine with empty application state, configuration, and services. |
Engine |
Creates an engine with the specified application state, configuration, and service provider. |
Engine |
Creates an engine with the specified application state, configuration, and service provider. |
Engine |
Creates an engine with the specified application state, configuration, and service provider. |
Engine |
Creates an engine with the specified application state and service provider. |
Engine |
Creates an engine with the specified application state. |
Engine |
Creates an engine with the specified service provider. |
Properties
Name | Property Type | Summary |
---|---|---|
Analyzers | IAnalyzerCollection |
A collection of analyzers.
|
ApplicationState | IApplicationState |
Gets the state of the application when it was run.
|
CancellationToken | CancellationToken |
Gets a cancellation token that will be canceled when processing should stop.
|
ClassCatalog | ClassCatalog |
A catalog of all classes in all assemblies loaded by the current application context.
|
Events | IEventCollection |
Gets global events and event handlers.
|
ExecutingPipelines | I |
The pipelines currently being executed.
|
ExecutionDateTime | DateTime |
The date/time that the current execution started.
|
ExecutionId | Guid |
Uniquely 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.
|
LinkGenerator | ILinkGenerator |
Helps generate normalized links.
|
Logger | ILogger | |
MemoryStreamFactory | IMemoryStreamFactory |
Provides pooled memory streams (via the RecyclableMemoryStream library).
|
Namespaces | I |
Gets a set of namespaces that should be brought into scope for modules that perform dynamic compilation.
|
OutputPages | FilteredDocumentList |
Gets the collection of output documents from all previously processed pipelines,
filtered to destination paths with a
PageFileExtensions
extension (which defaults to ".htm" and ".html").
|
Outputs | IPipelineOutputs |
Gets the collection of output documents from all previously processed pipelines.
|
Pipelines | IPipelineCollection |
Gets the pipelines.
|
ScriptHelper | IScriptHelper |
Gets a helper that can compile and evaluate C# scripts.
|
SerialExecution | bool |
Executes pipeline phases and modules in serial.
|
Services | IServiceProvider |
Gets the dependency injection service provider.
|
Settings | ISettings |
Gets the configuration and settings.
|
Shortcodes | IShortcodeCollection |
Gets the shortcodes.
|
Methods
Name | Return Value | Summary |
---|---|---|
Apply |
void |
Applies settings for analyzers and log levels as "[analyzer]=[log level]" (log level is optional, "All" to set all analyzers).
|
CreateDocument |
IDocument | |
CreateDocument |
TDocument | |
CreateHttpClient |
HttpClient |
Creates a
HttpClient instance that should be used for all HTTP communication.
|
CreateHttpClient |
HttpClient |
Creates a new
HttpClient instance that uses a custom message handler.
|
Dispose |
void | |
ExecuteAsync |
Task |
|
ExecuteAsync |
Task |
Executes the specified pipelines and pipelines with
Always policies.
|
ExecuteAsync |
Task |
Executes the specified pipelines and pipelines with
Always policies.
|
GetContentStream |
Stream |
Gets a
Stream that can be used for document content. If content
is not null, the stream is initialized with the specified content. It is preferred 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.
Instances of the returned stream should be disposed when writing is complete.
|
Get |
I |
Gets a new
IJavaScriptEnginePool . The returned engine pool should be disposed
when no longer needed.
|
Send |
Task |
Sends an
HttpRequestMessage with exponential back-off.
|
Send |
Task |
Sends an
HttpRequestMessage with exponential back-off.
|
Set |
void |
Extension Methods
Name | Value | Summary |
---|---|---|
Clone |
IDocument | |
Clone |
IDocument | |
Clone |
IDocument | |
Clone |
IDocument | |
Clone |
IDocument | |
Clone |
IDocument | |
Clone |
TDocument | |
Clone |
TDocument | |
Clone |
TDocument | |
Clone |
TDocument | |
Clone |
TDocument | |
Clone |
TDocument | |
CreateDocument |
IDocument | |
CreateDocument |
IDocument | |
CreateDocument |
IDocument | |
CreateDocument |
IDocument | |
CreateDocument |
IDocument | |
CreateDocument |
TDocument | |
CreateDocument |
TDocument | |
CreateDocument |
TDocument | |
CreateDocument |
TDocument | |
CreateDocument |
TDocument | |
GetCurrentDateTime |
DateTime |
Gets the current date/time using the
CurrentDateTime metadata setting if it's set,
otherwise using the value of ExecutionDateTime (which is
System.DateTime.Now at the time execution started).
|
GetLink |
string |
Gets a link for the specified document using the document destination.
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.
|
GetLink |
string |
Gets a link for the specified metadata using the specified metadata value and the default settings from the
configuration. 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.
|
GetLink |
string |
Gets a link for the specified metadata using the specified metadata value and the default settings from the
configuration. 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.
|
GetLink |
string |
Converts the specified path into a string appropriate for use as a link using default settings from the
configuration. 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.
|
GetLink |
string |
Converts the path into a string appropriate for use as a link, overriding one or more
settings from the configuration.
|
GetLink |
string |
Converts the path into a string appropriate for use as a link, overriding one or more
settings from the configuration.
|
GetLink |
string |
Converts the path into a string appropriate for use as a link, overriding one or more
settings from the configuration.
|
GetLink |
string |
Converts the path into a string appropriate for use as a link, overriding one or more
settings from the configuration.
|
GetLink |
string |
Converts the path into a string appropriate for use as a link, overriding one or more
settings from the configuration.
|
GetLink |
string |
Converts the path into a string appropriate for use as a link, overriding one or more
settings from the configuration.
|
GetLink |
string |
Converts the path into a string appropriate for use as a link, overriding one or more
settings from the configuration.
|
GetLink |
string |
Converts the path into a string appropriate for use as a link, overriding one or more
settings from the configuration.
|
GetLink |
string |
Converts the specified path into a string appropriate for use as a link using default settings from the
configuration. 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.
|
GetLink |
string |
Converts the path into a string appropriate for use as a link, overriding one or more
settings from the configuration.
|
GetLink |
string |
Converts the path into a string appropriate for use as a link, overriding one or more
settings from the configuration.
|
GetLink |
string |
Converts the path into a string appropriate for use as a link, overriding one or more
settings from the configuration.
|
GetLink |
string |
Converts the path into a string appropriate for use as a link, overriding one or more
settings from the configuration.
|
GetLink |
string |
Converts the path into a string appropriate for use as a link, overriding one or more
settings from the configuration.
|
GetLink |
string |
Converts the path into a string appropriate for use as a link, overriding one or more
settings from the configuration.
|
GetLink |
string |
Converts the path into a string appropriate for use as a link, overriding one or more
settings from the configuration.
|
GetLink |
string |
Converts the path into a string appropriate for use as a link, overriding one or more
settings from the configuration.
|
GetLink |
string |
Gets a link for the root of the site using the host and root path specified in the settings.
|
LogAndCheckVersion |
void |
From IEngineExtensions
|
Send |
Task |
Sends a GET request with exponential back-off.
|
Send |
Task |
Sends a GET request with exponential back-off.
|
ThrowIfNull |
T |
From GuardExtensions
|
ToDocument |
IDocument | |
ToDocument |
IDocument | |
ToDocument |
IDocument | |
ToDocument |
IDocument | |
ToDocument |
IDocument | |
ToDocument |
IDocument |