Interface IBindOnlyContainer
Provides a dependency injection container interface that allows only binding operations.
Namespace: AlchemyBow.Core.IoC
Assembly: AlchemyBow.Core.dll
Syntax
public interface IBindOnlyContainer
Methods
AddRangeToDynamicCollectionBinding<TCollection, TItem>(IEnumerable<TItem>)
Ensures that there is a key-value pair for the dynamic collection and adds specified items.
Declaration
void AddRangeToDynamicCollectionBinding<TCollection, TItem>(IEnumerable<TItem> items) where TCollection : ICollection<TItem>
Parameters
| Type | Name | Description |
|---|---|---|
| IEnumerable<TItem> | items | The items to add. |
Type Parameters
| Name | Description |
|---|---|
| TCollection | The key of the dynamic collection. |
| TItem | The type of items in the collection. |
Remarks
Informs the container that it should inject dependencies to the instance of the collection but not into the items. (The dependencies are injected during the resolve process.)
AddToDynamicCollectionBinding<TCollection, TItem>(TItem)
Ensures that there is a key-value pair for the dynamic collection and adds the specified item.
Declaration
void AddToDynamicCollectionBinding<TCollection, TItem>(TItem item) where TCollection : ICollection<TItem>
Parameters
| Type | Name | Description |
|---|---|---|
| TItem | item | The item to add. |
Type Parameters
| Name | Description |
|---|---|
| TCollection | The key of the dynamic collection. |
| TItem | The type of items in the collection. |
Remarks
Informs the container that it should inject dependencies to the instance of the collection but not into the item. (The dependencies are injected during the resolve process.)
Bind(Type, object)
Declares a new key-value pair and informs the container that it should inject dependencies to the instance of the value.
Declaration
void Bind(Type key, object value)
Parameters
| Type | Name | Description |
|---|---|---|
| Type | key | The key. |
| object | value | The instance of the value. |
Remarks
The dependencies are injected during the resolve process.
BindInaccessible(object)
Informs the container that it should inject dependencies to the instance.
Declaration
void BindInaccessible(object instance)
Parameters
| Type | Name | Description |
|---|---|---|
| object | instance | The instance to inform about. |
Remarks
The dependencies are injected during the resolve process.
Bind<T>(T)
Declares a new key-value pair and informs the container that it should inject dependencies to the instance of the value.
Declaration
void Bind<T>(T value)
Parameters
| Type | Name | Description |
|---|---|---|
| T | value | The instance of the value. |
Type Parameters
| Name | Description |
|---|---|
| T | The key. |
Remarks
The dependencies are injected during the resolve process.
EnsureDynamicCollectionBinding<TCollection>()
Ensures that there is a key-value pair for the dynamic collection.
Declaration
void EnsureDynamicCollectionBinding<TCollection>()
Type Parameters
| Name | Description |
|---|---|
| TCollection | The key of the dynamic collection. |