Table of Contents

Interface IOpenGenericDependencyImplementorBuilder

Namespace
LfrlAnvil.Dependencies
Assembly
LfrlAnvil.Dependencies.dll

Represents an open generic dependency implementor resolution builder.

public interface IOpenGenericDependencyImplementorBuilder

Properties

Constructor

Explicit constructor definition of this implementor's instances.

IDependencyConstructor? Constructor { get; }

Property Value

IDependencyConstructor

DisposalStrategy

Disposal strategy of this implementor's instances. See DependencyImplementorDisposalStrategy for more information.

DependencyImplementorDisposalStrategy DisposalStrategy { get; }

Property Value

DependencyImplementorDisposalStrategy

ImplementorType

Implementor's type.

Type ImplementorType { get; }

Property Value

Type

OnResolvingCallback

Specifies an optional callback that gets invoked right before the dependency instance is resolved. The first argument denotes the type of a dependency to resolve and the second argument is the scope that is resolving the dependency.

Action<Type, IDependencyScope>? OnResolvingCallback { get; }

Property Value

Action<Type, IDependencyScope>

Methods

FromConstructor(Action<IDependencyConstructorInvocationOptions>?)

Specifies that this implementor's instances should be created by the best suited constructor of this implementor's type.

IOpenGenericDependencyImplementorBuilder FromConstructor(Action<IDependencyConstructorInvocationOptions>? configuration = null)

Parameters

configuration Action<IDependencyConstructorInvocationOptions>

Optional configurator of the constructor invocation.

Returns

IOpenGenericDependencyImplementorBuilder

this.

FromConstructor(ConstructorInfo, Action<IDependencyConstructorInvocationOptions>?)

Specifies that this implementor's instances should be created by the provided constructor.

IOpenGenericDependencyImplementorBuilder FromConstructor(ConstructorInfo info, Action<IDependencyConstructorInvocationOptions>? configuration = null)

Parameters

info ConstructorInfo

Constructor to use for creating implementor instances.

configuration Action<IDependencyConstructorInvocationOptions>

Optional configurator of the constructor invocation.

Returns

IOpenGenericDependencyImplementorBuilder

this.

FromType(Type, Action<IDependencyConstructorInvocationOptions>?)

Specifies that this implementor's instances should be created by the best suited constructor of the provided type.

IOpenGenericDependencyImplementorBuilder FromType(Type type, Action<IDependencyConstructorInvocationOptions>? configuration = null)

Parameters

type Type

Implementor's type.

configuration Action<IDependencyConstructorInvocationOptions>

Optional configurator of the constructor invocation.

Returns

IOpenGenericDependencyImplementorBuilder

this.

SetDisposalStrategy(DependencyImplementorDisposalStrategy)

Sets the DisposalStrategy of this instance.

IOpenGenericDependencyImplementorBuilder SetDisposalStrategy(DependencyImplementorDisposalStrategy strategy)

Parameters

strategy DependencyImplementorDisposalStrategy

Strategy to set.

Returns

IOpenGenericDependencyImplementorBuilder

this.

SetOnResolvingCallback(Action<Type, IDependencyScope>?)

Sets the OnResolvingCallback for this instance.

IOpenGenericDependencyImplementorBuilder SetOnResolvingCallback(Action<Type, IDependencyScope>? callback)

Parameters

callback Action<Type, IDependencyScope>

Delegate to set.

Returns

IOpenGenericDependencyImplementorBuilder

this.