Table of Contents

Interface IDependencyContainerBuilder

Namespace
LfrlAnvil.Dependencies
Assembly
LfrlAnvil.Dependencies.dll

Represents an IDisposableDependencyContainer builder.

public interface IDependencyContainerBuilder : IDependencyLocatorBuilder
Inherited Members
Extension Methods

Properties

Configuration

Represents the current configuration.

IDependencyContainerConfigurationBuilder Configuration { get; }

Property Value

IDependencyContainerConfigurationBuilder

Methods

GetKeyedLocator<TKey>(TKey)

Gets or adds a keyed IDependencyLocatorBuilder<TKey> instance.

[Pure]
IDependencyLocatorBuilder<TKey> GetKeyedLocator<TKey>(TKey key) where TKey : notnull

Parameters

key TKey

Locator's key.

Returns

IDependencyLocatorBuilder<TKey>

Existing IDependencyLocatorBuilder<TKey> or an added one.

Type Parameters

TKey

Key type.

SetDefaultDisposalStrategy(DependencyImplementorDisposalStrategy)

Sets the DefaultDisposalStrategy of this instance.

IDependencyContainerBuilder SetDefaultDisposalStrategy(DependencyImplementorDisposalStrategy strategy)

Parameters

strategy DependencyImplementorDisposalStrategy

Default strategy to set.

Returns

IDependencyContainerBuilder

this.

SetDefaultLifetime(DependencyLifetime)

Sets the DefaultLifetime of this instance.

IDependencyContainerBuilder SetDefaultLifetime(DependencyLifetime lifetime)

Parameters

lifetime DependencyLifetime

Default lifetime to set.

Returns

IDependencyContainerBuilder

this.

TryBuild()

Attempts to build an IDisposableDependencyContainer instance.

[Pure]
DependencyContainerBuildResult<IDisposableDependencyContainer> TryBuild()

Returns

DependencyContainerBuildResult<IDisposableDependencyContainer>

DependencyContainerBuildResult<TContainer> instance with the build attempt result.