Config<TValue> Class
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>.
Namespace
Statiq.Common
Interfaces
Base Types
  • object
graph BT Type-->Base0["object"] Type-.->Interface0["IConfig"] click Interface0 "/api/Statiq.Common/IConfig" Type-.->Interface1["IMetadataValue"] click Interface1 "/api/Statiq.Common/IMetadataValue" Type["Config<TValue>"] class Type type-node

Syntax

public class Config<TValue> : IConfig, IMetadataValue

Type Parameters

Name Description
TValue The value type for this config data.

Properties

Name Property Type Summary
RequiresDocument bool

Operators

Name Value Summary
implicit operator Config<IEnumerable<object>>(Config<TValue>) Config<IEnumerable<object>>
implicit operator Config<object>(Config<TValue>) Config<object>
implicit operator Config<TValue>(TValue) Config<TValue>

Extension Methods

Name Value Summary
Cast<TValue>() Config<TValue>
Casts the config delegate to the specified type.
CombineWith<TValue, TValue, TSecond>(Config<TSecond>, Func<TValue, TSecond, IDocument, IExecutionContext, Task<TValue>>) Config<TValue>
CombineWith<TValue, TValue, TSecond>(Config<TSecond>, Func<TValue, TSecond, IDocument, IExecutionContext, TValue>) Config<TValue>
CombineWith<TValue, TValue, TSecond>(Config<TSecond>, Func<TValue, TSecond, IExecutionContext, Task<TValue>>) Config<TValue>
CombineWith<TValue, TValue, TSecond>(Config<TSecond>, Func<TValue, TSecond, IExecutionContext, TValue>) Config<TValue>
CombineWith<TValue, TValue, TSecond>(Config<TSecond>, Func<TValue, TSecond, Task<TValue>>) Config<TValue>
CombineWith<TValue, TValue, TSecond>(Config<TSecond>, Func<TValue, TSecond, TValue>) Config<TValue>
EnsureNonDocument<Config<TValue>>(string) TConfig
Ensures that the config is not null and doesn't require a document and throws System.ArgumentNullException or ArgumentException if it is.
EnsureNonDocumentIfNonNull<Config<TValue>>(string) TConfig
Ensures that the config doesn't require a document, but only if not null and throws ArgumentException if it does.
EnsureNonNull<Config<TValue>>(string) TConfig
Ensures that the config is not null and throws System.ArgumentNullException if it is.
GetValueAsync<TValue>(IDocument, IExecutionContext, Func<TValue, TValue>) Task<TValue>
MakeEnumerable<TValue>() Config<IEnumerable<TValue>>
ThrowIfNull<Config<TValue>>(string) T
ToDocument<Config<TValue>>(IContentProvider) IDocument
ToDocument<Config<TValue>>(IEnumerable<KeyValuePair<string, object>>, IContentProvider) IDocument
ToDocument<Config<TValue>>(NormalizedPath, IContentProvider) IDocument
ToDocument<Config<TValue>>(NormalizedPath, IEnumerable<KeyValuePair<string, object>>, IContentProvider) IDocument
ToDocument<Config<TValue>>(NormalizedPath, NormalizedPath, IContentProvider) IDocument
ToDocument<Config<TValue>>(NormalizedPath, NormalizedPath, IEnumerable<KeyValuePair<string, object>>, IContentProvider) IDocument
Transform<TValue, TValue>(Func<TValue, IDocument, IExecutionContext, Task<TValue>>) Config<TValue>
Transform<TValue, TValue>(Func<TValue, IDocument, IExecutionContext, TValue>) Config<TValue>
Transform<TValue, TValue>(Func<TValue, IExecutionContext, Task<TValue>>) Config<TValue>
Transform<TValue, TValue>(Func<TValue, IExecutionContext, TValue>) Config<TValue>
Transform<TValue, TValue>(Func<TValue, Task<TValue>>) Config<TValue>
Transform<TValue, TValue>(Func<TValue, TValue>) Config<TValue>