DelegateMetadataValue Class
This class uses a delegate to get a metadata value.
Namespace
Statiq.Common
Interfaces
Base Types
  • object
Derived Types
graph BT Type-->Base0["object"] Type-.->Interface0["IMetadataValue"] click Interface0 "/api/Statiq.Common/IMetadataValue" Type["DelegateMetadataValue"] class Type type-node Derived0["CachedDelegateMetadataValue"]-->Type click Derived0 "/api/Statiq.Common/CachedDelegateMetadataValue"

Syntax

public class DelegateMetadataValue : IMetadataValue

Constructors

Name Summary
DelegateMetadataValue(Func<IMetadata, object>) Initializes a new instance of the DelegateMetadataValue class. The specified delegate should be thread-safe.
DelegateMetadataValue(Func<string, IMetadata, object>) Initializes a new instance of the DelegateMetadataValue class. The specified delegate should be thread-safe.

Methods

Name Return Value Summary
Get(string, IMetadata) object
Lazily loads a metadata value. This method will be called for each request and the return object will be processed like any other metadata value. The implementation of this method must be thread-safe.

Extension Methods