ControllerServices Class
Represents a container for services that can be specific to a controller. This shadows the services from its parent ServicesContainer. A controller can either set a service here, or fall through to the more global set of services.
Assembly: System.Web.Http (in System.Web.Http.dll)
System.Web.Http.Controllers::ServicesContainer
System.Web.Http.Controllers::ControllerServices
| Name | Description | |
|---|---|---|
![]() | ControllerServices(ServicesContainer^) | Initializes a new instance of the ControllerServices class. |
| Name | Description | |
|---|---|---|
![]() | Add(Type^, Object^) | Adds a service to the end of services list for the given service type. (Inherited from ServicesContainer.) |
![]() | AddRange(Type^, IEnumerable<Object^>^) | Adds the services of the specified collection to the end of the services list for the given service type. (Inherited from ServicesContainer.) |
![]() | Clear(Type^) | Removes all the service instances of the given service type. (Inherited from ServicesContainer.) |
![]() | ClearMultiple(Type^) | Removes all instances of a multi-instance service type.(Inherited from ServicesContainer.) |
![]() | ClearSingle(Type^) | Removes a single-instance service from the default services.(Overrides ServicesContainer::ClearSingle(Type^).) |
![]() | Dispose() | Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.(Inherited from ServicesContainer.) |
![]() | 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. (Inherited from ServicesContainer.) |
![]() | GetHashCode() | (Inherited from Object.) |
![]() | GetService(Type^) | Gets a service of the specified type.(Overrides ServicesContainer::GetService(Type^).) |
![]() | GetServiceInstances(Type^) | Gets the list of service objects for a given service type, and validates the service type.(Overrides ServicesContainer::GetServiceInstances(Type^).) |
![]() | GetServices(Type^) | Gets the list of service objects for a given service type.(Overrides ServicesContainer::GetServices(Type^).) |
![]() | GetType() | (Inherited from Object.) |
![]() | Insert(Type^, Int32, Object^) | Inserts a service into the collection at the specified index. (Inherited from ServicesContainer.) |
![]() | InsertRange(Type^, Int32, IEnumerable<Object^>^) | Inserts the elements of the collection into the service list at the specified index. (Inherited from ServicesContainer.) |
![]() | IsSingleService(Type^) | Queries whether a service type is single-instance.(Overrides ServicesContainer::IsSingleService(Type^).) |
![]() | MemberwiseClone() | (Inherited from Object.) |
![]() | Remove(Type^, Object^) | Removes the first occurrence of the given service from the service list for the given service type. (Inherited from ServicesContainer.) |
![]() | RemoveAll(Type^, Predicate<Object^>^) | Removes all the elements that match the conditions defined by the specified predicate. (Inherited from ServicesContainer.) |
![]() | RemoveAt(Type^, Int32) | Removes the service at the specified index. (Inherited from ServicesContainer.) |
![]() | 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. (Inherited from ServicesContainer.) |
![]() | ReplaceMultiple(Type^, Object^) | Replaces all instances of a multi-instance service with a new instance.(Inherited from ServicesContainer.) |
![]() | ReplaceRange(Type^, IEnumerable<Object^>^) | Replaces all existing services for the given service type with the given service instances. (Inherited from ServicesContainer.) |
![]() | ReplaceSingle(Type^, Object^) | Replaces a single-instance service object.(Overrides ServicesContainer::ReplaceSingle(Type^, Object^).) |
![]() | ResetCache(Type^) | Removes the cached values for a single service type.(Inherited from ServicesContainer.) |
![]() | 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.

