CustomDocument.

Get<T>(string, T) Method

Summary

Gets the value for the specified key. This method never throws an exception. It will return the specified default value if the key is not found.
Assembly
Wyam.Core.dll
Namespace
Wyam.Core.Documents
Containing Type
CustomDocument

Syntax

public T Get<T>(string key, T defaultValue)

Type Parameters

Name Description
T The desired return type.

Parameters

Name Type Description
key string The key of the value to get.
defaultValue T The default value to use if the key is not found or cannot be converted to type T.

Return Value

Type Description
T The value for the specified key converted to type T or the specified default value.
GitHub