Tries to convert the provided value to the specified type while recursively expanding
IMetadataValue
.
- Namespace
- Statiq
.Common - Containing Type
- TypeHelper
Syntax
public static bool TryExpandAndConvert<T>(string key, object value, IMetadata metadata, out T result)
Type Parameters
Name | Description |
---|---|
T | The desired return type. |
Parameters
Name | Type | Description |
---|---|---|
key | string | The metadata key being expanded. |
value | object | The value to convert. |
metadata | IMetadata | The current metadata instance. |
result | T | The result of conversion. |
Return Value
Type | Description |
---|---|
bool | true if the value could be converted to the desired type, false otherwise. |