ShortcodeExtensions Class

Assembly
Wyam.Common.dll
Namespace
Wyam.Common.Shortcodes
Base Types
  • Object
graph BT Type-->Base0["Object"] Type["ShortcodeExtensions"] class Type type-node

Syntax

public static class ShortcodeExtensions

Methods

Name Value Summary
SingleValue(KeyValuePair<string, string>[]) string
Validates that the arguments contain a single value and returns it. This will collapse keys and values into a single argument value so that "=" doesn't have to be escaped with quotes.
static
ToDictionary(KeyValuePair<string, string>[], IExecutionContext, string[]) ConvertingDictionary
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.
static
ToValueArray(IEnumerable<KeyValuePair<string, string>>) string[]
Returns arguments as an array. This will collapse keys and values into a single argument value so that "=" doesn't have to be escaped with quotes.
static
ToValueArray(KeyValuePair<string, string>[], int) string[]
Validates that the correct number of unnamed arguments have been used and returns them as an array. This will collapse keys and values into a single argument value so that "=" doesn't have to be escaped with quotes.
static
ToValueArray(KeyValuePair<string, string>[], int, int) string[]
Validates that the correct number of arguments have been used and returns them as an array. This will collapse keys and values into a single argument value so that "=" doesn't have to be escaped with quotes.
static
GitHub