ShortcodeExtensions.

ToDictionary(KeyValuePair<string, string>[], IExecutionContext, string[]) Method

Summary

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 and exception will be thrown.
Assembly
Wyam.Common.dll
Namespace
Wyam.Common.Shortcodes
Containing Type
ShortcodeExtensions

Syntax

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

Parameters

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

Return Value

Type Description
ConvertingDictionary A dictionary containing the parameters and their values.
GitHub