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
-
- object
- Delegate
Metadata Value
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 |
---|---|
Cached |
Initializes a new instance of the CachedDelegateMetadataValue class.
The specified delegate should be thread-safe.
|
Cached |
Initializes a new instance of the CachedDelegateMetadataValue class.
The specified delegate should be thread-safe.
|
Methods
Name | Return Value | Summary |
---|---|---|
Get |
object |
Lazily loads a metadata value and caches the value.
|