MetadataConversionExtensions.

FilePath(IMetadata, string, FilePath) Method

Summary

Gets the value for the specified key converted to a Wyam.Common.Meta.MetadataConversionExtensions.FilePath(Wyam.Common.Meta.IMetadata,System.String,Wyam.Common.IO.FilePath). 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.FilePath(Wyam.Common.Meta.IMetadata,System.String,Wyam.Common.IO.FilePath).

Syntax

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

Parameters

Name Type Description
metadata IMetadata The metadata containing the value.
key string The key of the value to get.
defaultValue FilePath The default value to use if the key is not found or cannot be converted to a Wyam.Common.Meta.MetadataConversionExtensions.FilePath(Wyam.Common.Meta.IMetadata,System.String,Wyam.Common.IO.FilePath).

Return Value

Type Description
FilePath The value for the specified key converted to a Wyam.Common.Meta.MetadataConversionExtensions.FilePath(Wyam.Common.Meta.IMetadata,System.String,Wyam.Common.IO.FilePath) or the specified default value.
GitHub