Provides slightly nicer syntax than
KeyValuePair<string, object> for working
with metadata. Also contains a constructor that makes adding delegate-based metadata easier.
- Namespace
- Statiq
.Common - Base Types
-
- object
- ValueType
Syntax
public struct MetadataItem : ValueType
Constructors
| Name | Summary |
|---|---|
| MetadataItem |
Creates a new metadata item with a specified key-value pair. |
| MetadataItem |
This creates a new metadata value based on the specified delegate that will get evaluated on every value request. Note that the delegate function should be thread-safe. |
| MetadataItem |
Creates a new metadata item with the specified key and value. |
Properties
| Name | Property Type | Summary |
|---|---|---|
| Key | string |
Gets the key of the item.
|
| Pair | KeyValuePair |
Gets the underlying
KeyValuePair<TKey, TValue>.
|
| Value | object |
Gets the value of the item.
|
Operators
| Name | Value | Summary |
|---|---|---|
| implicit operator |
KeyValuePair |
|
| implicit operator |
MetadataItem |