Class DependencyResolver
- Namespace
- Dynamicweb.Extensibility.Dependencies
- Assembly
- Dynamicweb.Core.dll
Global dependency resolver accessible via the static Current property.
- Inheritance
-
Dependency
Resolver
- Implements
- Inherited Members
Remarks
This is essentially what is known as an 'anti-pattern' in DI/IoC, so please take that into consideration.
Only use this in places where constructor injection is not possible -
Properties
Current
The current dependency resolver.
Implements IServiceProvider , so usage of extension method from the 'Microsoft.Extensions.DependencyInjection' namespace is possible.
Property Value
Remarks
Exceptions
- Dependency
Resolver Exception Thrown if the dependency resolver is not initialized.
Methods
GetService(Type)
Gets the service object of the specified type.
Parameters
serviceType
TypeAn object that specifies the type of service object to get.