ServiceCollection.Get 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
Get(Type) | |
Get(Type, Boolean) | |
Get<TService>() | |
Get<TService>(Boolean) |
Get(Type)
Get(Type, Boolean)
public:
System::Object ^ Get(Type ^ serviceType, bool ensureExists);
public object Get (Type serviceType, bool ensureExists);
member this.Get : Type * bool -> obj
Public Function Get (serviceType As Type, ensureExists As Boolean) As Object
Parameters
- serviceType
- Type
- ensureExists
- Boolean
Returns
Applies to
Get<TService>()
public:
generic <typename TService>
TService Get();
public TService Get<TService> ();
member this.Get : unit -> 'Service
Public Function Get(Of TService) () As TService
Type Parameters
- TService
Returns
TService
Applies to
Get<TService>(Boolean)
public:
generic <typename TService>
TService Get(bool ensureExists);
public TService Get<TService> (bool ensureExists);
member this.Get : bool -> 'Service
Public Function Get(Of TService) (ensureExists As Boolean) As TService
Type Parameters
- TService
Parameters
- ensureExists
- Boolean
Returns
TService