Castle Windsor: Inject NameValueCollection vs. Dictionary
- by Aren B
I've already done many configs where dictionaries are passed into services in the <parameters> block.
But what I find myself needing right now is to build a NameValueCollection (allowing multiple entries with the same key) or a Collection of KeyValuePair objects.
The reason for this is im not using this dictionary to look up b when given a, im basically using it to pass in a Tuple (pair) of (a,b) to be used later in code.
Im kind of new to castle windor and I was wondering how i would go about making a List of KeyValuePair's injected, or a NameValueCollection injected.