ContainerGetInstance Method (Type)

Simple Injector
Gets an instance of the given serviceType.

Namespace:  SimpleInjector
Assembly:  SimpleInjector (in SimpleInjector.dll) Version: 4.0.0
Syntax

public Object GetInstance(
	Type serviceType
)

Parameters

serviceType
Type: SystemType
Type of object requested.

Return Value

Type: Object
The requested service instance.
Exceptions

ExceptionCondition
ActivationExceptionThrown when there are errors resolving the service instance.
See Also

Reference