Statiq.Common Namespace

Class Types

Class Summary
ActionDisposable A simple disposable that calls an action on disposal. This class will also throw an exception on subsequent disposals.
ActionDisposableStream Wraps a Stream and calls an action when it's disposed. Disposing this stream will also dispose the underlying stream before the action is called.
AfterEngineExecution
AfterModuleExecution
AfterPipelinePhaseExecution
Analyzer
ApplicationState Represents the state of the application when it was run.
AssemblyComparer Compares two assemblies for equality by comparing at their full names.
AsyncExtensions Convenience extensions to handle sync-over-async scenarios in tests. These extensions should not be used in production code due to being slower and hacky.
BeforeDeployment Raised before deployment pipelines are run or at the end of execution if there are no deployment pipelines (the event will always be raised regardless of whether there are deployment pipelines).
BeforeEngineExecution
BeforeModuleExecution
BeforePipelinePhaseExecution
BootstrapperConfigurationExtensions
BootstrapperEventExtensions
BootstrapperFileSystemExtensions
BootstrapperPipelineExtensions
BootstrapperSettingsExtensions
BootstrapperShortcodeExtensions
CacheCode A similar API to System.HashCode but deterministic (does not use a random seed) which makes it suitable for persistent saved cache keys.
CachedDelegateMetadataValue This class uses a delegate to get a metadata value. The result of the delegate will be cached and the cached value will be returned for subsequent calls to Get(string, IMetadata).
ChangeLevelLoggerProvider
ChildDocumentsModule An abstract base for modules that execute children and then combine the results with the input documents in some way.
ClassCatalog Contains all classes in all referenced assemblies. The dictionary key is the full class name and the value is the class type.
ClassCatalogExtensions
ComparisonComparer<T> Adapts a System.Comparison`1 delegate to IComparer<T>.
ConcurrentCache<TKey, TValue> Use this type instead of ConcurrentDictionary<TKey, TValue> in caching scenarios.
Config
Config<TValue> A union configuration value that can be either a delegate that uses a document and context or a simple value. Use the factory methods in the Config class to create one. Instances can also be created through implicit casting from the value type. Note that due to overload ambiguity, if a value type of object is used, then all overloads should also be Config<TValue>.
ConfigCombineWithExtensions
ConfigExtensions
ConfigModule<TValue> Base class for modules that rely on a config value and could apply to input documents (or not) depending on whether the config delegate requires them.
ConfigTransformExtensions
ConfigurableConfiguration
ConfigurableFileSystem
ConfigurableServices
ConfigurableSettings
ConvertingComparer<T> Adapts a typed equality comparer to untyped metadata by attempting to convert the metadata values to the comparer type before running the comparison. If either type can not be converted to T, the comparison returns the default object comparison.
ConvertingDictionary A dictionary with metadata type conversion superpowers.
ConvertingEqualityComparer<T> Adapts a typed equality comparer to untyped metadata by attempting to convert the metadata values to the comparer type before running the comparison. If neither type can be converted to T, the comparison fails.
Crc32 A helper class to quickly calculate CRC32 codes.
DateTimeCultureExtensions Extensions for working with input and output date cultures.
DelegateAnalyzer An analyzer that runs a delegate.
DelegateConfigurator<TConfigurable>
DelegateContent A content provider that uses a delegate to get the stream.
DelegateItemStream<TItem> A read-only, non-seeking stream produced by iterating over a collection of arbitrary objects.
DelegateMetadataValue This class uses a delegate to get a metadata value.
DelegateStringItemStream<TItem> A read-only, non-seeking string-based stream produced by iterating over a collection of arbitrary objects.
DelegatingStream Delegates all stream access to an underlying stream. Disposing this stream will not dispose the wrapped stream unless the derived implementation does that explicitly.
DirectoryEqualityComparer Compares IDirectory equality.
Document A simple document that has content and metadata.
Document<TDocument> A base class for custom document types.
DocumentFactory
DocumentFileProvider Represents a sequence of documents as a file system (I.e., for use in the globber).
DocumentIdComparer A simple IEqualityComparer<T> that compares documents by Id.
DocumentIdComparer<TDocument> A simple document comparer that compares documents by Id.
DocumentList<TDocument> A list of documents.
DocumentMetadataComparer<TDocument, TValue> Performs comparisons between documents using a specified metadata key and value type.
DocumentMetadataComparer<TValue> Performs comparisons between documents using a specified metadata key and value type.
DocumentMetadataTree<TDocument>
DocumentPathTree<TDocument>
EmptyDisposable A disposable class that does nothing.
EnumerableEnumerator<TValue> Wraps a function that produces an IEnumerator<T> and provides it as a IEnumerator<T>.
ExceptionExtensions
ExecutionException An exception that is thrown when there is an error during execution.
ExecutionOutputs Contains the output documents from execution.
ExplicitGrouping<TKey, TValue>
FactoryDocument This is a non-generic base class for Document<TDocument> and is not intended to be used directly. Derive from Document<TDocument> instead.
FileContent A content provider for files.
FileEqualityComparer Compares IFile equality.
FilteredDocumentList<TDocument> A filtered list of documents that also implements IDocumentPathTree<TDocument> so that the resulting documents can be easily traversed as a tree structure.
FilteredMetadata
ForAllDocuments Executes the input documents against the specified child modules. This module is useful for grouping child modules into a single parent module.
ForEachDocument Executes the input documents one at a time against the specified child modules.
Globber Helper methods to work with globbing patterns.
GroupByExtensions Extensions for performing grouping operations.
GuardExtensions
HtmlDocumentCacheInitializer
HtmlHelper
IAnalyzerCollectionExtensions
ICollectionExtensions Extension methods for collection types.
IComparerExtensions
IConfiguratorCollectionExtensions
IDictionaryExtensions
IDisplayableExtensions
IDocumentCloneExtensions
IDocumentEnumerableExtensions Extensions for working with specific types of collections.
IDocumentExtensions
IDocumentFactoryCreateDocumentExtensions
IDocumentGetLinkExtensions
IDocumentGroupByExtensions Extensions grouping document sequences.
IDocumentHtmlExtensions
IDocumentPathTreeExtensions
IDocumentToLookupExtensions Extensions for creating lookups from document sequences.
IDocumentTreeExtensions
IDocumentYieldExtensions
IElementExtensions
IEnumerableExtensions
IEqualityComparerExtensions
IEventCollectionExtensions
IExecutionContextCloneOrCreateDocumentsExtensions
IExecutionContextCreateDocumentFromStreamExtensions Extensions to IExecutionContext that create a document from Stream content sources.
IExecutionContextCreateDocumentFromStringExtensions Extensions to IExecutionContext that create a document from string content sources.
IExecutionContextExecuteModulesExtensions
IExecutionContextGetContentProviderExtensions
IExecutionStateExtensions
IExecutionStateGetLinkExtensions
IFileExtensions
ILoggerExtensions
IMarkupFormattableExtensions
IMemoryStreamFactoryExtensions
IMetadataConversionExtensions Extensions to make it easier to get typed information from metadata.
IMetadataGetExtensions
IMetadataJsonExtensions
IMetadataXmlExtensions
IModuleExtensions
InterceptingLoggerProvider
InterlockedBool
InvalidConversionException The exception that is thrown when a conversion is invalid.
IParallelModuleExtensions
IPipelineCollectionExtensions Extensions for working with pipeline collections.
IPipelineExtensions
IPipelineOutputsExtensions
IReadOnlyApplicationStateExtensions
IReadOnlyDictionaryExtensions
IReadOnlyFileSystemExtensions
IReadOnlyListExtensions
IReadOnlySettingsExtensions
IServiceCollectionExtensions
IServiceProviderExtensions
IShortcodeCollectionExtensions
ItemStream<TItem> A read-only, non-seeking stream produced by iterating over a collection of arbitrary objects.
Keys Common metadata keys for modules in the core library.
LazyDocumentMetadataValue Stores the ID of a document and attempts to lazily find it in the current input documents and their children when the value is requested.
LinkGenerator Helps generate normalized links.
LockingStreamWrapper Provides a wrapper around a stream that locks the stream during concurrent access.
LoggedException Wraps an exception thrown inside the engine while executing nested modules to prevent repeating the log message.
LoggerFactoryLoggerWrapper Always provides a wrapped ILogger.
MediaTypes Contains common media types and file extension mappings.
MemoryContent A content provider for raw memory.
MemoryExtensions
MemoryItemStream A read-only, non-seeking stream produced by iterating over a collection of byte arrays.
MemoryStringEqualityComparer
Metadata A linked list of metadata items.
MetadataDictionary
MetadataDictionaryJsonConverter A JSON converter that will convert a JSON object to nested IMetadata.
MetadataItems A collection of metadata items.
Module A common base class for modules.
ModuleList A collection of modules.
MultiConfigModule Base class for modules that rely on multiple config values and could apply to input documents (or not) depending on whether the config delegates require them.
MultiConfigModuleBase
MultiShortcode A base class for shortcodes.
MultiValueDictionary<TKey, TValue>
NamedPipelineWrapper Wraps a pipeline in order to provide an alternate name during registration.
NullContent A special IContentProvider that you can use to indicate that a null content provider should be used instead of the existing content provider when cloning documents (because otherwise if null is passed in as the content provider the one from the existing document will be used in the cloned document).
NullTextWriter
ObjectDocument<T> A special type of IDocument that wraps an underlying object, providing the object properties as metadata.
ObjectToDocumentExtensions
ParallelAsyncExtensions General extensions for LINQ-like parallel async operations on arbitrary objects.
ParallelConfigModule<TValue> Base class for modules that rely on a config value and could apply to input documents in parallel (or not) depending on whether the config delegate requires them.
ParallelModule A module that processes documents in parallel (with the option to process sequentially).
ParallelMultiConfigModule Base class for modules that rely on multiple config values and could apply to input documents in parallel (or not) depending on whether the config delegate requires them.
ParallelSyncConfigModule<TValue> Base class for modules that rely on a config value and could apply to input documents in parallel (or not) depending on whether the config delegate requires them.
ParallelSyncModule A module that processes documents in parallel (with the option to process sequentially).
ParallelSyncMultiConfigModule Base class for modules that rely on multiple config values and could apply to input documents in parallel (or not) depending on whether the config delegate requires them.
ParentModule A base class for modules that contain a collection of child modules. Note that this does not call an execute method and derived modules need to override one.
ParentModuleExtensions
PathCollection An ordered collection of unique NormalizedPath.
PathEqualityComparer Compares NormalizedPath instances.
ProcessLauncher A utility class that wraps process launching and provides better tracking and logging.
PropertyMetadata<T> Provides metadata for the properties of a given object.
PropertyMetadataAttribute Indicates that a document property should have a different metadata name than the property name.
ReadDataModule<TModule, TItem> A base class for modules that read documents from data that can be turned into a Dictionary<string,object>.
ReadOnlyConvertingDictionary A dictionary with metadata type conversion superpowers.
ScriptMetadataValue A lazily evaluated metadata value based on script code.
Settings
SettingsParser Parses INI-like args in key=value format.
Shortcode A base class for simple shortcodes that return string content.
ShortcodeArgsExtensions
ShortcodeArgumentException
ShortcodeHelper Utility methods to help with shortcodes.
ShortcodeParserException
ShortcodeResult
ShouldExtensions
SignalingStream Wraps a Stream and signals when it's disposed.
SpanExtensions
StatiqLogState
StatiqLogState<TInnerState>
StatiqMarkupFormatter This uncomments shortcode processing instructions which currently get parsed as comments in AngleSharp (see https://github.com/Wyamio/Statiq/issues/784 and https://github.com/AngleSharp/AngleSharp/pull/762). It also ensures raw text content isn't escaped so that character escapes like @ (for the at symbol) don't end up getting encoded back to the original symbol, which in that case would break Razor processing.
StreamContent A content provider that wraps a seekable stream.
StreamExtensions Extension methods for use with Stream.
StringContent A content provider for strings.
StringExtensions
StringItemStream A read-only, non-seeking string-based stream produced by iterating over a collection of strings.
StringItemStream<TItem> A read-only, non-seeking string-based stream produced by iterating over a collection of arbitrary objects.
StringStream
SyncAnalyzer
SyncChildDocumentsModule An abstract base for modules that execute children and then combine the results with the input documents in some way.
SyncConfigModule<TValue> Base class for modules that rely on a config value and could apply to input documents (or not) depending on whether the config delegate requires them.
SyncModule A common base class for synchronous modules.
SyncMultiConfigModule Base class for modules that rely on multiple config values and could apply to input documents (or not) depending on whether the config delegate requires them.
SyncMultiShortcode A base class for synchronous shortcodes.
SyncParentModule A base class for modules that contain a collection of child modules.
SyncShortcode A base class for synchronous simple shortcodes that return string content.
TaskExtensions
ToLookupExtensions
ToStringTableExtensions
TypeHelper
ZipFileHelper

Structure Types

Structure Summary
MetadataItem Provides slightly nicer syntax than KeyValuePair<string, object> for working with metadata. Also contains a constructor that makes adding delegate-based metadata easier.
NormalizedPath Provides properties and instance methods for working with paths.
RelativeUrl Provides ways to work with relative URLs.

Interface Types

Interface Summary
IAnalyzer
IAnalyzerCollection
IAnalyzerContext Tracks analyzer results and passes information about the current execution state to analyzers.
IApplicationState Represents the state of the application when it was run.
IBaseCommand
IBootstrapper
IBootstrapperInitializer Implement this interface to define an initializer that will get automatically instantiated and run by the bootstrapper at startup.
ICacheCode An object that provides a deterministic hash code suitable for caching.
IConcurrentCache
IConfig
IConfigurable A marker interface that indicates a given object can be configured by the bootstrapper.
IConfigurator<TConfigurable>
IConfiguratorCollection Contains a collection of configurators that can be used to configure a given type of object.
IContentProvider Contains the content for a document.
IContentProviderFactory Implementations of this interface can return a content provider.
IDirectory Represents a directory. Not all implementations will support all available methods and may throw System.NotSupportedException.
IDisplayable Indicates the implementation supports a display string (typically used for logging).
IDocument Contains content and metadata for each item as it propagates through the pipeline.
IDocumentFactory
IDocumentPathTree<TDocument>
IDocumentTree<TDocument>
IEngine The engine is the primary entry point for the generation process.
IEngineInitializer Implement this interface to define an initializer that will get automatically instantiated and run by the engine at startup.
IEventCollection Contains global events and event handlers.
IExecutionContext All of the information that represents a given build. Also implements IMetadata to expose the global metadata.
IExecutionState A read-only interface to the IEngine used during an execution.
IFile Represents a file. Not all implementations will support all available methods and may throw System.NotSupportedException.
IFileCleaner Cleans files and folders from the file system, usually before or after an execution using the CleanMode setting.
IFileProvider A provider that can instantiate IFile and IDirectory objects from their paths.
IFileSystem A file system that can be configured.
IFileSystemEntry Represents an entry in the file system.
IFileWriteTracker Tracks the state of files being written to and their source content. This helps determine when a file should be overwritten when using Unwritten.
IJavaScriptEngine A common interface to a JavaScript engine. Every JavaScript engine is obtained from a IJavaScriptEnginePool and will be returned to the pool when it is disposed. Therefore, you must dispose the engine when you are done with it.
IJavaScriptEnginePool Provides a shared pool of JavaScript engine instances. You should dispose the pool when no longer needed to properly dispose of any allocated engines.
ILinkGenerator Helps generate normalized links.
IMemoryStreamFactory Provides pooled memory streams (via the RecyclableMemoryStream library).
IMetadata Contains a set of metadata with flexible runtime conversion methods. Metadata keys are case-insensitive.
IMetadataDictionary A mutable IMetadata implementation that works like a dictionary.
IMetadataValue Implement this interface to provide lazy metadata values or values based on other metadata.
IModule The primary module interface for classes that can transform or otherwise operate on documents.
INamedPipeline Represents a pipeline with a name.
INamedPipelineWrapper
INamespacesCollection A collection of namespace strings used to inform modules of which namespaces should be available during dynamic code generation and/or execution.
IParallelModule
IPipeline Represents a named collection of modules that should be executed by the engine.
IPipelineCollection A collection of pipelines.
IPipelineOutputs Contains a collection of documents output by pipelines.
IReadOnlyEventCollection Contains global events and event handlers.
IReadOnlyFileSystem Represents a file system.
IReadOnlyPipeline Represents a named collection of modules that should be executed by the engine.
IReadOnlyPipelineCollection
IReadOnlySettings
IReadOnlyShortcodeCollection
IScriptHelper
ISettings A combination of configuration data and settings that provides global metadata to the engine.
IShortcode Contains the code for a given shortcode.
IShortcodeCollection

Enum Types

Enum Summary
CleanMode
ExecutionPolicy Indicates when the pipeline is executed.
PathKind The kind of the path.
Phase

Delegate Types

Delegate Summary
AsyncEventHandler<TEvent> An asynchronous event handler.
EventHandler<TEvent> An asynchronous event handler.