Open sandboxFocus

Class LazyDependencyInjectionStrategy

A dependency implementation strategy that resolves the dependencies the first time they are used and pull a Func<TResult> from the constructor.

Inheritance
LazyDependencyInjectionStrategy
Implements
Namespace: Metalama.Extensions.DependencyInjection.Implementation
Assembly: Metalama.Extensions.DependencyInjection.dll
Syntax
public class LazyDependencyInjectionStrategy : DefaultDependencyInjectionStrategy, ITemplateProvider

Constructors

Name Description
LazyDependencyInjectionStrategy(DependencyProperties)

Methods

Name Description
TryImplementDependency(IAspectBuilder<IFieldOrProperty>)
TryIntroduceDependency(IAspectBuilder<INamedType>, out IFieldOrProperty?)

The entry point of the DefaultDependencyInjectionStrategy. Orchestrates all steps: first calls Metalama.Extensions.DependencyInjection.Implementation.DefaultDependencyInjectionStrategy.TryIntroduceFieldOrProperty(Metalama.Framework.Aspects.IAspectBuilder{Metalama.Framework.Code.INamedType},Metalama.Framework.Code.IFieldOrProperty@,System.Boolean@), then GetPullStrategy(IFieldOrProperty), then TryPullDependency(IAspectBuilder<INamedType>, IFieldOrProperty, IPullStrategy).

Extension Methods