Share via


ServiceCollection.Add Method

Definition

Overloads

Add(Type, Object)
Add<TService>(TService)

Add(Type, Object)

public:
 void Add(Type ^ serviceType, System::Object ^ serviceInstance);
public void Add (Type serviceType, object serviceInstance);
member this.Add : Type * obj -> unit
Public Sub Add (serviceType As Type, serviceInstance As Object)

Parameters

serviceType
Type
serviceInstance
Object

Applies to

Add<TService>(TService)

public:
generic <typename TService>
 void Add(TService serviceInstance);
public void Add<TService> (TService serviceInstance);
member this.Add : 'Service -> unit
Public Sub Add(Of TService) (serviceInstance As TService)

Type Parameters

TService

Parameters

serviceInstance
TService

Applies to