Metalama 1.0 / / Metalama Documentation / Aspect API Documentation / Metalama.​Framework.​Dependency­Injection.​Implementation / Default­Dependency­Injection­Framework

Class DefaultDependencyInjectionFramework

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

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

Constructors

Name Description
DefaultDependencyInjectionFramework()

Methods

Name Description
CanHandleDependency(DependencyContext)

Determines whether the current instance can handle a DependencyAttribute aspect or IntroduceDependencyAttribute advice. The implementation can report diagnostics to Diagnostics.

GetStrategy(DependencyContext)

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

ImplementDependency(ImplementDependencyContext, IAspectBuilder<IFieldOrProperty>)

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

IntroduceDependency(IntroduceDependencyContext, IAspectBuilder<INamedType>)

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

Extension Methods

PresentingExtensions.AsHyperlink(Object)