ServicesContainer Class

 

An abstract class that provides a container for services used by ASP.NET Web API.

Namespace:   System.Web.Http.Controllers
Assembly:  System.Web.Http (in System.Web.Http.dll)

Inheritance Hierarchy

System.Object
  System.Web.Http.Controllers.ServicesContainer
    System.Web.Http.Controllers.ControllerServices
    System.Web.Http.Services.DefaultServices

Syntax

public abstract class ServicesContainer : IDisposable
public ref class ServicesContainer abstract : IDisposable
[<AbstractClass>]
type ServicesContainer = 
    class
        interface IDisposable
    end
Public MustInherit Class ServicesContainer
    Implements IDisposable

Constructors

Name Description
System_CAPS_protmethod ServicesContainer()

Initializes a new instance of the ServicesContainer class.

Methods

Name Description
System_CAPS_pubmethod Add(Type, Object)

Adds a service to the end of services list for the given service type.

System_CAPS_pubmethod AddRange(Type, IEnumerable<Object>)

Adds the services of the specified collection to the end of the services list for the given service type.

System_CAPS_pubmethod Clear(Type)

Removes all the service instances of the given service type.

System_CAPS_protmethod ClearMultiple(Type)

Removes all instances of a multi-instance service type.

System_CAPS_protmethod ClearSingle(Type)

Removes a single-instance service type.

System_CAPS_pubmethod Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

System_CAPS_pubmethod Equals(Object)

(Inherited from Object.)

System_CAPS_protmethod Finalize()

(Inherited from Object.)

System_CAPS_pubmethod 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.

System_CAPS_pubmethod GetHashCode()

(Inherited from Object.)

System_CAPS_pubmethod GetService(Type)

Gets a service instance of a specified type.

System_CAPS_protmethod GetServiceInstances(Type)

Gets a mutable list of service instances of a specified type.

System_CAPS_pubmethod GetServices(Type)

Gets a collection of service instanes of a specified type.

System_CAPS_pubmethod GetType()

(Inherited from Object.)

System_CAPS_pubmethod Insert(Type, Int32, Object)

Inserts a service into the collection at the specified index.

System_CAPS_pubmethod InsertRange(Type, Int32, IEnumerable<Object>)

Inserts the elements of the collection into the service list at the specified index.

System_CAPS_pubmethod IsSingleService(Type)

Determine whether the service type should be fetched with GetService or GetServices.

System_CAPS_protmethod MemberwiseClone()

(Inherited from Object.)

System_CAPS_pubmethod Remove(Type, Object)

Removes the first occurrence of the given service from the service list for the given service type.

System_CAPS_pubmethod RemoveAll(Type, Predicate<Object>)

Removes all the elements that match the conditions defined by the specified predicate.

System_CAPS_pubmethod RemoveAt(Type, Int32)

Removes the service at the specified index.

System_CAPS_pubmethod 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.

System_CAPS_protmethod ReplaceMultiple(Type, Object)

Replaces all instances of a multi-instance service with a new instance.

System_CAPS_pubmethod ReplaceRange(Type, IEnumerable<Object>)

Replaces all existing services for the given service type with the given service instances.

System_CAPS_protmethod ReplaceSingle(Type, Object)

Replaces a single-instance service of a specified type.

System_CAPS_protmethod ResetCache(Type)

Removes the cached values for a single service type.

System_CAPS_pubmethod ToString()

(Inherited from Object.)

Extension Methods

Name Description
System_CAPS_pubmethod GetActionInvoker()

Gets the IHttpActionInvoker service.(Defined by ServicesExtensions.)

System_CAPS_pubmethod GetActionSelector()

Gets the IHttpActionSelector service.(Defined by ServicesExtensions.)

System_CAPS_pubmethod GetActionValueBinder()

Gets the IActionValueBinder service.(Defined by ServicesExtensions.)

System_CAPS_pubmethod GetApiExplorer()

Gets the IApiExplorer service.(Defined by ServicesExtensions.)

System_CAPS_pubmethod GetAssembliesResolver()

Gets the IAssembliesResolver service.(Defined by ServicesExtensions.)

System_CAPS_pubmethod GetBodyModelValidator()

Gets the IBodyModelValidator service.(Defined by ServicesExtensions.)

System_CAPS_pubmethod GetContentNegotiator()

Gets the IContentNegotiator service.(Defined by ServicesExtensions.)

System_CAPS_pubmethod GetDocumentationProvider()

Gets the IDocumentationProvider service.(Defined by ServicesExtensions.)

System_CAPS_pubmethod GetExceptionHandler()

Returns the registered unhandled exception handler, if any.(Defined by ServicesExtensions.)

System_CAPS_pubmethod GetExceptionLoggers()

Returns the collection of registered unhandled exception loggers.(Defined by ServicesExtensions.)

System_CAPS_pubmethod GetFilterProviders()

Gets the IFilterProvider collection.(Defined by ServicesExtensions.)

System_CAPS_pubmethod GetHostBufferPolicySelector()

Gets the IHostBufferPolicySelector service.(Defined by ServicesExtensions.)

System_CAPS_pubmethod GetHttpControllerActivator()

Gets the IHttpControllerActivator service.(Defined by ServicesExtensions.)

System_CAPS_pubmethod GetHttpControllerSelector()

Gets the IHttpControllerSelector service.(Defined by ServicesExtensions.)

System_CAPS_pubmethod GetHttpControllerTypeResolver()

Gets the IHttpControllerTypeResolver service.(Defined by ServicesExtensions.)

System_CAPS_pubmethod GetModelBinderProviders()

Gets the ModelBinderProvider collection.(Defined by ServicesExtensions.)

System_CAPS_pubmethod GetModelMetadataProvider()

Gets the ModelMetadataProvider service.(Defined by ServicesExtensions.)

System_CAPS_pubmethod GetModelValidatorProviders()

Gets the ModelValidatorProvider collection.(Defined by ServicesExtensions.)

System_CAPS_pubmethod GetTraceManager()

Gets the ITraceManager service.(Defined by ServicesExtensions.)

System_CAPS_pubmethod GetTraceWriter()

Gets the ITraceWriterservice.(Defined by ServicesExtensions.)

System_CAPS_pubmethod GetValueProviderFactories()

Gets the ValueProviderFactory collection.(Defined by ServicesExtensions.)

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

System.Web.Http.Controllers Namespace

Return to top