ServicesContainer.Insert Method

Inserts a service into the collection at the specified index.

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

Syntax

'Declaration
Public Sub Insert ( _
    serviceType As Type, _
    index As Integer, _
    service As Object _
)
'Usage
Dim instance As ServicesContainer 
Dim serviceType As Type 
Dim index As Integer 
Dim service As Object

instance.Insert(serviceType, index, service)
public void Insert(
    Type serviceType,
    int index,
    Object service
)
public:
void Insert(
    Type^ serviceType, 
    int index, 
    Object^ service
)
member Insert : 
        serviceType:Type * 
        index:int * 
        service:Object -> unit
public function Insert(
    serviceType : Type, 
    index : int, 
    service : Object
)

Parameters

  • index
    Type: System.Int32

    The zero-based index at which the service should be inserted. If MaxValue is passed, ensures the element is added to the end.

See Also

Reference

ServicesContainer Class

System.Web.Http.Controllers Namespace