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
ImplementorKey
Custom implementor key.
public IDependencyKey? ImplementorKey { get; }
Property Value
Predicate
Predicate used for locating the desired parameter or member, denoted by the predicate returning true.
public Func<T, bool> Predicate { get; }
Property Value
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
IDependencyKeyCustom implementor key.
Returns
- InjectableDependencyResolution<T>
New InjectableDependencyResolution<T> instance.