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
Methods
GetKeyedLocator<TKey>(TKey)
Gets or adds a keyed IDependencyLocatorBuilder<TKey> instance.
[Pure]
IDependencyLocatorBuilder<TKey> GetKeyedLocator<TKey>(TKey key) where TKey : notnull
Parameters
keyTKeyLocator's key.
Returns
- IDependencyLocatorBuilder<TKey>
Existing IDependencyLocatorBuilder<TKey> or an added one.
Type Parameters
TKeyKey type.
SetDefaultDisposalStrategy(DependencyImplementorDisposalStrategy)
Sets the DefaultDisposalStrategy of this instance.
IDependencyContainerBuilder SetDefaultDisposalStrategy(DependencyImplementorDisposalStrategy strategy)
Parameters
strategyDependencyImplementorDisposalStrategyDefault strategy to set.
Returns
SetDefaultLifetime(DependencyLifetime)
Sets the DefaultLifetime of this instance.
IDependencyContainerBuilder SetDefaultLifetime(DependencyLifetime lifetime)
Parameters
lifetimeDependencyLifetimeDefault lifetime to set.
Returns
TryBuild()
Attempts to build an IDisposableDependencyContainer instance.
[Pure]
DependencyContainerBuildResult<IDisposableDependencyContainer> TryBuild()
Returns
- DependencyContainerBuildResult<IDisposableDependencyContainer>
DependencyContainerBuildResult<TContainer> instance with the build attempt result.