ServicesContainer.ReplaceMultiple Method
Replaces all instances of a multi-instance service with a new instance.
Namespace: System.Web.Http.Controllers
Assembly: System.Web.Http (in System.Web.Http.dll)
Syntax
'Declaration
Protected Overridable Sub ReplaceMultiple ( _
serviceType As Type, _
service As Object _
)
'Usage
Dim serviceType As Type
Dim service As Object
Me.ReplaceMultiple(serviceType, service)
protected virtual void ReplaceMultiple(
Type serviceType,
Object service
)
protected:
virtual void ReplaceMultiple(
Type^ serviceType,
Object^ service
)
abstract ReplaceMultiple :
serviceType:Type *
service:Object -> unit
override ReplaceMultiple :
serviceType:Type *
service:Object -> unit
protected function ReplaceMultiple(
serviceType : Type,
service : Object
)
Parameters
serviceType
Type: System.TypeThe type of service.
service
Type: System.ObjectThe service instance that will replace the current services of this type.
Remarks
Call this method to replace a list of services of type serviceType with a single service of that type.