Summary
Gets the value for the specified key converted to a Wyam.Common.Meta.MetadataConversionExtensions.DirectoryPath(Wyam.Common.Meta.IMetadata,System.String,Wyam.Common.IO.DirectoryPath). This method never throws an exception. It will
return the specified default value if the key is not found or if the string value can't be converted to a Wyam.Common.Meta.MetadataConversionExtensions.DirectoryPath(Wyam.Common.Meta.IMetadata,System.String,Wyam.Common.IO.DirectoryPath).
Syntax
public static DirectoryPath DirectoryPath(this IMetadata metadata, string key, DirectoryPath defaultValue = null)
Parameters
| Name |
Type |
Description |
| metadata |
IMetadata |
The metadata containing the value. |
| key |
string |
The key of the value to get. |
| defaultValue |
DirectoryPath |
The default value to use if the key is not found or cannot be converted to a Wyam.Common.Meta.MetadataConversionExtensions.DirectoryPath(Wyam.Common.Meta.IMetadata,System.String,Wyam.Common.IO.DirectoryPath). |
Return Value
| Type |
Description |
| DirectoryPath |
The value for the specified key converted to a Wyam.Common.Meta.MetadataConversionExtensions.DirectoryPath(Wyam.Common.Meta.IMetadata,System.String,Wyam.Common.IO.DirectoryPath) or the specified default value. |