Here are some examples of Slim doing round-trip conversions from a string to a standard type back to a string.
slim domain |
Boolean:
check | round trip for type | System.Boolean | value | true | true |
check | round trip for type | System.Boolean | value | false | false |
Enumerations:
check | round trip for type | System.Reflection.BindingFlags | value | Public | Public |
check | round trip for type | System.Reflection.BindingFlags | value | Instance, Public | Instance, Public |
Nullable types:
check | round trip for nullable int | 1 | 1 |
check | round trip for nullable int | null | null |
Dictionaries:
Slim converts a nested two-column table into a dictionary. There is new wiki markup for this:
|my method|!{name:bob, addr:here}|The method parameter can be any generic Dictionary and the nested cells will be parsed into the generic key and value types.
public void MyMethod(Dictionary<string ,string> dictionary) ...
check | lookup | key2 | in | <table> <tr><td>key1</td><td>value1</td></tr> <tr><td>key2</td><td>value2</td></tr> </table> | value2 |