CachedDelegateMetadataValue Class
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).
Namespace
Statiq.Common
Interfaces
Base Types
graph BT Type-->Base0["DelegateMetadataValue"] click Base0 "/api/Statiq.Common/DelegateMetadataValue" Base0-->Base1["object"] Type-.->Interface0["IMetadataValue"] click Interface0 "/api/Statiq.Common/IMetadataValue" Type["CachedDelegateMetadataValue"] class Type type-node

Syntax

public class CachedDelegateMetadataValue : DelegateMetadataValue, IMetadataValue

Constructors

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

Methods

Name Return Value Summary
Get(string, IMetadata) object
Lazily loads a metadata value and caches the value.

Extension Methods