Get(IMetadata, string, object) Method
Gets the value for the specified key. This method never throws an exception. It will return the specified default value or null if the key is not found or is null.
Namespace
Statiq.Common
Containing Type
IMetadataGetExtensions

Syntax

public static object Get(this IMetadata metadata, string key, object defaultValue = null)

Parameters

Name Type Description
metadata IMetadata The metadata instance.
key string The key of the value to get.
defaultValue object The default value to use if the key is not found or is null.

Return Value

Type Description
object The value for the specified key or the specified default value.