ServicesContainer.Replace Method (Type, Object)
Replaces all existing services for the given service type with the given service instance. This works for both singular and plural services.
Namespace: System.Web.Http.Controllers
Assembly: System.Web.Http (in System.Web.Http.dll)
Syntax
public void Replace(
Type serviceType,
object service
)
public:
void Replace(
Type^ serviceType,
Object^ service
)
member Replace :
serviceType:Type *
service:Object -> unit
Public Sub Replace (
serviceType As Type,
service As Object
)
Parameters
serviceType
Type: System.TypeThe service type.
service
Type: System.ObjectThe service instance.
See Also
ServicesContainer Class
System.Web.Http.Controllers Namespace
Return to top