ServiceCollection.AddNew Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
AddNew(Type) | |
AddNew(Type, Type) | |
AddNew<TService,TRegisterAs>() | |
AddNew<TService>() |
AddNew(Type)
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