ServicesContainer Class
An abstract class that provides a container for services used by ASP.NET Web API.
Assembly: System.Web.Http (in System.Web.Http.dll)
System.Web.Http.Controllers::ServicesContainer
System.Web.Http.Controllers::ControllerServices
System.Web.Http.Services::DefaultServices
| Name | Description | |
|---|---|---|
![]() | ServicesContainer() | Initializes a new instance of the ServicesContainer class. |
| Name | Description | |
|---|---|---|
![]() | Add(Type^, Object^) | Adds a service to the end of services list for the given service type. |
![]() | AddRange(Type^, IEnumerable<Object^>^) | Adds the services of the specified collection to the end of the services list for the given service type. |
![]() | Clear(Type^) | Removes all the service instances of the given service type. |
![]() | ClearMultiple(Type^) | Removes all instances of a multi-instance service type. |
![]() | ClearSingle(Type^) | Removes a single-instance service type. |
![]() | Dispose() | Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. |
![]() | Equals(Object^) | (Inherited from Object.) |
![]() | Finalize() | (Inherited from Object.) |
![]() | FindIndex(Type^, Predicate<Object^>^) | Searches for a service that matches the conditions defined by the specified predicate, and returns the zero-based index of the first occurrence. |
![]() | GetHashCode() | (Inherited from Object.) |
![]() | GetService(Type^) | Gets a service instance of a specified type. |
![]() | GetServiceInstances(Type^) | Gets a mutable list of service instances of a specified type. |
![]() | GetServices(Type^) | Gets a collection of service instanes of a specified type. |
![]() | GetType() | (Inherited from Object.) |
![]() | Insert(Type^, Int32, Object^) | Inserts a service into the collection at the specified index. |
![]() | InsertRange(Type^, Int32, IEnumerable<Object^>^) | Inserts the elements of the collection into the service list at the specified index. |
![]() | IsSingleService(Type^) | Determine whether the service type should be fetched with GetService or GetServices. |
![]() | MemberwiseClone() | (Inherited from Object.) |
![]() | Remove(Type^, Object^) | Removes the first occurrence of the given service from the service list for the given service type. |
![]() | RemoveAll(Type^, Predicate<Object^>^) | Removes all the elements that match the conditions defined by the specified predicate. |
![]() | RemoveAt(Type^, Int32) | Removes the service at the specified index. |
![]() | Replace(Type^, Object^) | Replaces all existing services for the given service type with the given service instance. This works for both singular and plural services. |
![]() | ReplaceMultiple(Type^, Object^) | Replaces all instances of a multi-instance service with a new instance. |
![]() | ReplaceRange(Type^, IEnumerable<Object^>^) | Replaces all existing services for the given service type with the given service instances. |
![]() | ReplaceSingle(Type^, Object^) | Replaces a single-instance service of a specified type. |
![]() | ResetCache(Type^) | Removes the cached values for a single service type. |
![]() | ToString() | (Inherited from Object.) |
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

