Interface IComponentContainer
An internal container that manages and resolves components that contribute to Ninject.
Inherited Members
Namespace: Telerik.JustMock.AutoMock.Ninject.Components
Assembly: Telerik.JustMock.dll
Syntax
public interface IComponentContainer : IDisposable
Properties
Kernel
Gets or sets the kernel that owns the component container.
Declaration
IKernel Kernel { get; set; }
Property Value
IKernel
|
Methods
Add<TComponent, TImplementation>()
Registers a component in the container.
Declaration
void Add<TComponent, TImplementation>()
where TComponent : INinjectComponent where TImplementation : TComponent, INinjectComponent
Type Parameters
TComponent
The component type. |
TImplementation
The component's implementation type. |
AddTransient<TComponent, TImplementation>()
Registers a transient component in the container.
Declaration
void AddTransient<TComponent, TImplementation>()
where TComponent : INinjectComponent where TImplementation : TComponent, INinjectComponent
Type Parameters
TComponent
The component type. |
TImplementation
The component's implementation type. |
Get(Type)
Gets one instance of the specified component.
Declaration
object Get(Type component)
Parameters
System.Type
component
The component type. |
Returns
System.Object
The instance of the component. |
Get<T>()
Gets one instance of the specified component.
Declaration
T Get<T>()
where T : INinjectComponent
Returns
T
The instance of the component. |
Type Parameters
T
The component type. |
GetAll(Type)
Gets all available instances of the specified component.
Declaration
IEnumerable<object> GetAll(Type component)
Parameters
System.Type
component
The component type. |
Returns
System.Collections.Generic.IEnumerable<System.Object>
A series of instances of the specified component. |
GetAll<T>()
Gets all available instances of the specified component.
Declaration
IEnumerable<T> GetAll<T>()
where T : INinjectComponent
Returns
System.Collections.Generic.IEnumerable<T>
A series of instances of the specified component. |
Type Parameters
T
The component type. |
Remove<T, TImplementation>()
Removes the specified registration.
Declaration
void Remove<T, TImplementation>()
where T : INinjectComponent where TImplementation : T
Type Parameters
T
The component type. |
TImplementation
The implementation type. |
RemoveAll(Type)
Removes all registrations for the specified component.
Declaration
void RemoveAll(Type component)
Parameters
System.Type
component
The component's type. |
RemoveAll<T>()
Removes all registrations for the specified component.
Declaration
void RemoveAll<T>()
where T : INinjectComponent
Type Parameters
T
The component type. |