Share via


ServiceCollection.AddNew Method

Definition

Overloads

AddNew(Type)
AddNew(Type, Type)
AddNew<TService,TRegisterAs>()
AddNew<TService>()

AddNew(Type)

public:
 System::Object ^ AddNew(Type ^ serviceType);
public object AddNew (Type serviceType);
member this.AddNew : Type -> obj
Public Function AddNew (serviceType As Type) As Object

Parameters

serviceType
Type

Returns

Applies to

AddNew(Type, Type)

public:
 System::Object ^ AddNew(Type ^ serviceType, Type ^ registerAs);
public object AddNew (Type serviceType, Type registerAs);
member this.AddNew : Type * Type -> obj
Public Function AddNew (serviceType As Type, registerAs As Type) As Object

Parameters

serviceType
Type
registerAs
Type

Returns

Applies to

AddNew<TService,TRegisterAs>()

public:
generic <typename TService, typename TRegisterAs>
 where TService : TRegisterAs TService AddNew();
public TService AddNew<TService,TRegisterAs> () where TService : TRegisterAs;
member this.AddNew : unit -> 'Service
Public Function AddNew(Of TService As TRegisterAs, TRegisterAs As TRegisterAs) () As TService

Type Parameters

TService
TRegisterAs

Returns

TService

Applies to

AddNew<TService>()

public:
generic <typename TService>
 TService AddNew();
public TService AddNew<TService> ();
member this.AddNew : unit -> 'Service
Public Function AddNew(Of TService) () As TService

Type Parameters

TService

Returns

TService

Applies to