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
IntroduceDependency(IAdviser<INamedType>)

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

TryImplementDependency(IAdviser<IFieldOrProperty>)

Extension Methods