Class ServiceContainer
Represents a service container that can hold and manage services.
public class ServiceContainer
- Inheritance
-
ServiceContainer
- Inherited Members
Methods
AddService<T>(string, T)
Adds a service to the container.
public void AddService<T>(string name, T service) where T : class
Parameters
namestringserviceT
Type Parameters
T
GetAllServices<T>()
Gets all services of a specific type from the container.
public IEnumerable<T> GetAllServices<T>() where T : class
Returns
- IEnumerable<T>
Type Parameters
T
GetService<T>(string)
Removes a service from the container.
public T GetService<T>(string name) where T : class
Parameters
namestring
Returns
- T
Type Parameters
T