ToDictionary(KeyValuePair<string, string>[], string[]) Method
Converts the shortcode arguments into a dictionary of named parameters. This will match un-named positional parameters with their expected position after which named parameters will be included. If an un-named positional parameter follows named parameters an exception will be thrown.
Namespace
Statiq.Common
Containing Type
ShortcodeArgsExtensions

Syntax

public static IMetadataDictionary ToDictionary(this KeyValuePair<string, string>[] args, params string[] keys)

Parameters

Name Type Description
args KeyValuePair<string, string>[] The original shortcode arguments.
keys string[] The parameter names in expected order.

Return Value

Type Description
IMetadataDictionary A dictionary containing the parameters and their values.