FromContext<TValue>(Func<IExecutionContext, Task>) Method
Creates a config value from an action that uses the execution context and returns the default value of TValue.
Namespace
Statiq.Common
Containing Type
Config

Syntax

public static Config<TValue> FromContext<TValue>(Func<IExecutionContext, Task> action)

Type Parameters

Name Description
TValue The type of config value.

Parameters

Name Type Description
action Func<IExecutionContext, Task> A delegate action to evaluate.

Return Value

Type Description
Config<TValue> A config object.