Interface IContainer
Onbox's IOC container contract
Inherited Members
System.IDisposable.Dispose()
Namespace: Onbox.Abstractions.V8
Assembly: Onbox.Abstractions.dll
Syntax
public interface IContainer : IContainerResolver, IDisposable
Methods
| Improve this Doc View SourceAddScoped<TImplementation>()
Adds a scoped implementation on the container.
Declaration
void AddScoped<TImplementation>()
where TImplementation : class
Type Parameters
Name | Description |
---|---|
TImplementation |
AddScoped<TContract, TImplementation>()
Adds a scoped implementation to a contract on the container.
Declaration
void AddScoped<TContract, TImplementation>()
where TImplementation : class, TContract
Type Parameters
Name | Description |
---|---|
TContract | |
TImplementation |
AddSingleton<TImplementation>()
Adds an implementation as a singleton on the container.
Declaration
void AddSingleton<TImplementation>()
where TImplementation : class
Type Parameters
Name | Description |
---|---|
TImplementation |
AddSingleton<TImplementation>(TImplementation)
Adds an instance as a singleton on the container
Declaration
void AddSingleton<TImplementation>(TImplementation instance)
where TImplementation : class
Parameters
Type | Name | Description |
---|---|---|
TImplementation | instance |
Type Parameters
Name | Description |
---|---|
TImplementation |
AddSingleton<TContract, TImplementation>()
Adds an implementation to a contract as a singleton on the container
Declaration
void AddSingleton<TContract, TImplementation>()
where TImplementation : class, TContract
Type Parameters
Name | Description |
---|---|
TContract | |
TImplementation |
AddSingleton<TContract, TImplementation>(TImplementation)
Adds an instance as a singleton on the container
Declaration
void AddSingleton<TContract, TImplementation>(TImplementation instance)
where TImplementation : TContract
Parameters
Type | Name | Description |
---|---|---|
TImplementation | instance |
Type Parameters
Name | Description |
---|---|
TContract | |
TImplementation |
AddTransient<TImplementation>()
Adds an implementation as a transient on the container.
Declaration
void AddTransient<TImplementation>()
where TImplementation : class
Type Parameters
Name | Description |
---|---|
TImplementation |
AddTransient<TContract, TImplementation>()
Adds an implementation to a contract as transient on the container
Declaration
void AddTransient<TContract, TImplementation>()
where TImplementation : class, TContract
Type Parameters
Name | Description |
---|---|
TContract | |
TImplementation |
Clear()
Resets the entire container
Declaration
void Clear()