Table of Contents

Struct InjectableDependencyResolution<T>

Namespace
LfrlAnvil.Dependencies
Assembly
LfrlAnvil.Dependencies.dll

Represents a custom parameter or member resolution.

public readonly struct InjectableDependencyResolution<T> where T : class, ICustomAttributeProvider

Type Parameters

T

Dependency type.

Inherited Members

Properties

Factory

Custom resolution factory.

public Expression<Func<IDependencyScope, object>>? Factory { get; }

Property Value

Expression<Func<IDependencyScope, object>>

ImplementorKey

Custom implementor key.

public IDependencyKey? ImplementorKey { get; }

Property Value

IDependencyKey

Predicate

Predicate used for locating the desired parameter or member, denoted by the predicate returning true.

public Func<T, bool> Predicate { get; }

Property Value

Func<T, bool>

Methods

FromFactory(Func<T, bool>, Expression<Func<IDependencyScope, object>>)

Creates a new InjectableDependencyResolution<T> instance with a custom factory.

[Pure]
public static InjectableDependencyResolution<T> FromFactory(Func<T, bool> predicate, Expression<Func<IDependencyScope, object>> factory)

Parameters

predicate Func<T, bool>

Predicate used for locating the desired parameter or member, denoted by the predicate returning true.

factory Expression<Func<IDependencyScope, object>>

Custom resolution factory.

Returns

InjectableDependencyResolution<T>

New InjectableDependencyResolution<T> instance.

FromImplementorKey(Func<T, bool>, IDependencyKey)

Creates a new InjectableDependencyResolution<T> instance with custom implementor type.

[Pure]
public static InjectableDependencyResolution<T> FromImplementorKey(Func<T, bool> predicate, IDependencyKey implementorKey)

Parameters

predicate Func<T, bool>

Predicate used for locating the desired parameter or member, denoted by the predicate returning true.

implementorKey IDependencyKey

Custom implementor key.

Returns

InjectableDependencyResolution<T>

New InjectableDependencyResolution<T> instance.