MetalamaAPI documentationExtensions APIMetalama.​Extensions.​Dependency­Injection.​ImplementationDefault­Dependency­Injection­Framework
Open sandboxFocus

DefaultDependencyInjectionFramework Class

The default implementation of IDependencyInjectionFramework. It pulls dependencies from all constructors and use System.Func<> to accept lazy dependencies.

Inheritance
System.Object
DefaultDependencyInjectionFramework
Namespace: Metalama.Extensions.DependencyInjection.Implementation
Assembly: Metalama.Extensions.DependencyInjection.dll
Syntax
public class DefaultDependencyInjectionFramework : Object, IDependencyInjectionFramework

Constructors

Name Description
DefaultDependencyInjectionFramework()

Methods

Name Description
CanHandleDependency(DependencyProperties, in ScopedDiagnosticSink)

Determines whether the current instance can handle a DependencyAttribute aspect or IntroduceDependencyAttribute advice.

GetStrategy(DependencyProperties)

Gets an instance of the DefaultDependencyInjectionStrategy class for a given context.

TryImplementDependency(DependencyProperties, IAspectBuilder<IFieldOrProperty>)

Processes the DependencyAttribute aspect, i.e. changes the target field or property of the aspect into a dependency.

TryIntroduceDependency(DependencyProperties, IAspectBuilder<INamedType>, out IFieldOrProperty)

Processes the IntroduceDependencyAttribute advice, i.e. introduce a dependency defined by a custom aspect into the target type of the aspect.