Class DynamicCollectionBindingUtility
A utility class that simplifies adding items to dynamic collections of common types.
Inheritance
Namespace: AlchemyBow.Core.IoC
Assembly: AlchemyBow.Core.dll
Syntax
public static class DynamicCollectionBindingUtility
Methods
AddRangeToDynamicDictionaryBinding<TKey, TValue>(IBindOnlyContainer, IEnumerable<KeyValuePair<TKey, TValue>>)
A Dictionary
shortcut for IBindOnlyContainer.AddRangeToDynamicCollectionBinding
Declaration
public static void AddRangeToDynamicDictionaryBinding<TKey, TValue>(this IBindOnlyContainer container, IEnumerable<KeyValuePair<TKey, TValue>> items)
Parameters
Type | Name | Description |
---|---|---|
IBindOnlyContainer | container | The dependency injection container. |
System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<TKey, TValue>> | items | The key-value pairs to add. |
Type Parameters
Name | Description |
---|---|
TKey | The type of the key. |
TValue | The type of the value. |
AddRangeToDynamicHashSetBinding<TItem>(IBindOnlyContainer, IEnumerable<TItem>)
A HashSet
shortcut for IBindOnlyContainer.AddRangeToDynamicCollectionBinding
Declaration
public static void AddRangeToDynamicHashSetBinding<TItem>(this IBindOnlyContainer container, IEnumerable<TItem> items)
Parameters
Type | Name | Description |
---|---|---|
IBindOnlyContainer | container | The dependency injection container. |
System.Collections.Generic.IEnumerable<TItem> | items | The items to add. |
Type Parameters
Name | Description |
---|---|
TItem | The type of items in the collection. |
AddRangeToDynamicListBinding<TItem>(IBindOnlyContainer, IEnumerable<TItem>)
A List
shortcut for IBindOnlyContainer.AddRangeToDynamicCollectionBinding
Declaration
public static void AddRangeToDynamicListBinding<TItem>(this IBindOnlyContainer container, IEnumerable<TItem> items)
Parameters
Type | Name | Description |
---|---|---|
IBindOnlyContainer | container | The dependency injection container. |
System.Collections.Generic.IEnumerable<TItem> | items | The items to add. |
Type Parameters
Name | Description |
---|---|
TItem | The type of items in the collection. |
AddToDynamicDictionaryBinding<TKey, TValue>(IBindOnlyContainer, TKey, TValue)
A Dictionary
shortcut for IBindOnlyContainer.AddToDynamicCollectionBinding
Declaration
public static void AddToDynamicDictionaryBinding<TKey, TValue>(this IBindOnlyContainer container, TKey key, TValue value)
Parameters
Type | Name | Description |
---|---|---|
IBindOnlyContainer | container | The dependency injection container. |
TKey | key | The key. |
TValue | value | The value. |
Type Parameters
Name | Description |
---|---|
TKey | The type of the key. |
TValue | The type of the value. |
AddToDynamicDictionaryBinding<TKey, TValue>(IBindOnlyContainer, KeyValuePair<TKey, TValue>)
A Dictionary
shortcut for IBindOnlyContainer.AddToDynamicCollectionBinding
Declaration
public static void AddToDynamicDictionaryBinding<TKey, TValue>(this IBindOnlyContainer container, KeyValuePair<TKey, TValue> item)
Parameters
Type | Name | Description |
---|---|---|
IBindOnlyContainer | container | The dependency injection container. |
System.Collections.Generic.KeyValuePair<TKey, TValue> | item | The key-value pair to add. |
Type Parameters
Name | Description |
---|---|
TKey | The type of the key. |
TValue | The type of the value. |
AddToDynamicHashSetBinding<TItem>(IBindOnlyContainer, TItem)
A HashSet
shortcut for IBindOnlyContainer.AddToDynamicCollectionBinding
Declaration
public static void AddToDynamicHashSetBinding<TItem>(this IBindOnlyContainer container, TItem item)
Parameters
Type | Name | Description |
---|---|---|
IBindOnlyContainer | container | The dependency injection container. |
TItem | item | The item to add. |
Type Parameters
Name | Description |
---|---|
TItem | The type of items in the collection. |
AddToDynamicListBinding<TItem>(IBindOnlyContainer, TItem)
A List
shortcut for IBindOnlyContainer.AddToDynamicCollectionBinding
Declaration
public static void AddToDynamicListBinding<TItem>(this IBindOnlyContainer container, TItem item)
Parameters
Type | Name | Description |
---|---|---|
IBindOnlyContainer | container | The dependency injection container. |
TItem | item | The item to add. |
Type Parameters
Name | Description |
---|---|
TItem | The type of items in the collection. |