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
key
TKeyLocator'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
DependencyImplementorDisposalStrategyDefault strategy to set.
Returns
SetDefaultLifetime(DependencyLifetime)
Sets the DefaultLifetime of this instance.
IDependencyContainerBuilder SetDefaultLifetime(DependencyLifetime lifetime)
Parameters
lifetime
DependencyLifetimeDefault 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.