parent
4b55aa8693
commit
0c8fffb8dc
2 changed files with 50 additions and 1 deletions
@ -1,7 +1,53 @@ |
||||
The `IRegistrationBase` is an interface that is used to register an interface with the `IocContainer`. |
||||
The `IRegistrationBase` is a base interface for all registration classes that are used to register interfaces with the `IocContainer`. |
||||
|
||||
It consists only of two properties: |
||||
|
||||
```c# |
||||
/// <summary> |
||||
/// The name of the <see cref="IRegistrationBase"/> |
||||
/// </summary> |
||||
string Name { get; } |
||||
``` |
||||
|
||||
and |
||||
|
||||
```c# |
||||
/// <summary> |
||||
/// The <see cref="Type"/> of the Interface that is registered with this <see cref="IRegistrationBase"/> |
||||
/// </summary> |
||||
Type InterfaceType { get; } |
||||
``` |
||||
|
||||
## `IDefaultRegistration<TInterface>` |
||||
|
||||
This is the default registration that is used to register a `Type` for the interface it implements. `TInterface` is the `Type` of the interface. |
||||
|
||||
In addition to the implemented properties from the `IRegistrationBase` the `IDefaultRegistration` adds the following properties and methods: |
||||
|
||||
- The Type that implements the `IRegistrationBase.InterfaceType` that gets registered |
||||
|
||||
```c# |
||||
Type ImplementationType { get; } |
||||
``` |
||||
|
||||
- The `Lifestyle` of the registered `Type` |
||||
|
||||
```c# |
||||
Lifestyle Lifestyle { get; } |
||||
``` |
||||
|
||||
- An `Action` that is invoked when an instance of the registered type is created |
||||
|
||||
```c# |
||||
Action<TInterface> OnCreateAction { get; } |
||||
``` |
||||
|
||||
- A method to pass the `OnCreateAction` to the `IDefaultRegistration` |
||||
|
||||
```c# |
||||
IDefaultRegistration<TInterface> OnCreate(Action<TInterface> action); |
||||
``` |
||||
|
||||
## `IMultitonRegistration<TInterface>` |
||||
|
||||
## `ITypedFactoryRegistration<TFactory>` |
||||
|
||||
Loading…
Reference in new issue