classafIoc::InjectionCtx
sys::Obj afIoc::InjectionCtx
Passed to DependencyProviders to give contextual injection information.
- dependencyType
Type dependencyType { internal set }The
Typeto be injected. This is the declared type of the field or method parameter.- field
const Field? fieldThe field to be injected. Only available for field injection.
- fieldFacets
const Facet[] fieldFacetsThe facets of the field to be injected. Is never null, but may be empty.
- injectionKind
const InjectionKind injectionKindThe type of injection.
- log
Logs the message at IoC debug level.
- method
const Method? methodThe method to be injected. Only available for method injection.
- methodFacets
const Facet[] methodFacetsThe facets of the method to be injected. Is never null, but may be empty.
- methodParam
Param? methodParam { internal set }The method
Paramto be injected. Only available for method injection.- methodParamIndex
Int? methodParamIndex { internal set }The index of the method
Paramto be injected. Only available for method injection.- target
Obj? targetThe object that will receive the injection. Only available for field and (non-static) method injection.
- targetType
const Type? targetTypeThe
Typethat will receive the injection. This is the implementation type and may be different to thedepenencyType. Not available duringdependencyByType.- track
Obj? track(Str description, |->Obj? operation)Adds an nested operation description. This provides contextual information in the event of an Err. Example:
ctx,track("Doing complicated stuff") |->Obj?| { return stuff() }