Export (0) Print
Expand All

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)

public abstract class ServicesContainer : IDisposable

The ServicesContainer type exposes the following members.

  NameDescription
Protected methodServicesContainerInitializes a new instance of the ServicesContainer class.
Top

  NameDescription
Public methodAdd Adds a service to the end of services list for the given service type.
Public methodAddRange Adds the services of the specified collection to the end of the services list for the given service type.
Public methodClear Removes all the service instances of the given service type.
Protected methodClearMultipleRemoves all instances of a multi-instance service type.
Protected methodClearSingleRemoves a single-instance service type.
Public methodDisposePerforms application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Public methodEquals (Inherited from Object.)
Protected methodFinalize (Inherited from Object.)
Public methodFindIndex Searches for a service that matches the conditions defined by the specified predicate, and returns the zero-based index of the first occurrence.
Public methodGetHashCode (Inherited from Object.)
Public methodGetServiceGets a service instance of a specified type.
Protected methodGetServiceInstancesGets a mutable list of service instances of a specified type.
Public methodGetServicesGets a collection of service instanes of a specified type.
Public methodGetType (Inherited from Object.)
Public methodInsert Inserts a service into the collection at the specified index.
Public methodInsertRange Inserts the elements of the collection into the service list at the specified index.
Public methodIsSingleService Determine whether the service type should be fetched with GetService or GetServices.
Protected methodMemberwiseClone (Inherited from Object.)
Public methodRemove Removes the first occurrence of the given service from the service list for the given service type.
Public methodRemoveAll Removes all the elements that match the conditions defined by the specified predicate.
Public methodRemoveAt Removes the service at the specified index.
Public methodReplace Replaces all existing services for the given service type with the given service instance. This works for both singular and plural services.
Protected methodReplaceMultipleReplaces all instances of a multi-instance service with a new instance.
Public methodReplaceRange Replaces all existing services for the given service type with the given service instances.
Protected methodReplaceSingleReplaces a single-instance service of a specified type.
Protected methodResetCacheRemoves the cached values for a single service type.
Public methodToString (Inherited from Object.)
Top

  NameDescription
Public Extension MethodGetActionInvokerGets the IHttpActionInvoker service. (Defined by ServicesExtensions.)
Public Extension MethodGetActionSelectorGets the IHttpActionSelector service. (Defined by ServicesExtensions.)
Public Extension MethodGetActionValueBinderGets the IActionValueBinder service. (Defined by ServicesExtensions.)
Public Extension MethodGetApiExplorerGets the IApiExplorer service. (Defined by ServicesExtensions.)
Public Extension MethodGetAssembliesResolverGets the IAssembliesResolver service. (Defined by ServicesExtensions.)
Public Extension MethodGetBodyModelValidatorGets the IBodyModelValidator service. (Defined by ServicesExtensions.)
Public Extension MethodGetContentNegotiatorGets the IContentNegotiator service. (Defined by ServicesExtensions.)
Public Extension MethodGetDocumentationProviderGets the IDocumentationProvider service. (Defined by ServicesExtensions.)
Public Extension MethodGetFilterProvidersGets the IFilterProvider collection. (Defined by ServicesExtensions.)
Public Extension MethodGetHostBufferPolicySelectorGets the IHostBufferPolicySelector service. (Defined by ServicesExtensions.)
Public Extension MethodGetHttpControllerActivatorGets the IHttpControllerActivator service. (Defined by ServicesExtensions.)
Public Extension MethodGetHttpControllerSelectorGets the IHttpControllerSelector service. (Defined by ServicesExtensions.)
Public Extension MethodGetHttpControllerTypeResolverGets the IHttpControllerTypeResolver service. (Defined by ServicesExtensions.)
Public Extension MethodGetModelBinderProvidersGets the ModelBinderProvider collection. (Defined by ServicesExtensions.)
Public Extension MethodGetModelMetadataProviderGets the ModelMetadataProvider service. (Defined by ServicesExtensions.)
Public Extension MethodGetModelValidatorProvidersGets the ModelValidatorProvider collection. (Defined by ServicesExtensions.)
Public Extension MethodGetTraceManagerGets the ITraceManager service. (Defined by ServicesExtensions.)
Public Extension MethodGetTraceWriterGets the ITraceWriterservice. (Defined by ServicesExtensions.)
Public Extension MethodGetValueProviderFactoriesGets the ValueProviderFactory collection. (Defined by ServicesExtensions.)
Top

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