Interface IDependencyContainerConfigurationBuilder
- Namespace
- LfrlAnvil.Dependencies
- Assembly
- LfrlAnvil.Dependencies.dll
Represents a builder of dependency container configuration.
public interface IDependencyContainerConfigurationBuilder
Properties
InjectablePropertyType
Open generic type that describes the injectable member type.
Type InjectablePropertyType { get; }
Property Value
OptionalDependencyAttributeType
Type of an attribute that describes an optional dependency.
Type OptionalDependencyAttributeType { get; }
Property Value
TreatCaptiveDependenciesAsErrors
Specifies whether or not captive dependencies should be treated as errors instead of warnings.
bool TreatCaptiveDependenciesAsErrors { get; }
Property Value
Methods
EnableTreatingCaptiveDependenciesAsErrors(bool)
Sets the TreatCaptiveDependenciesAsErrors of this instance.
IDependencyContainerConfigurationBuilder EnableTreatingCaptiveDependenciesAsErrors(bool enabled = true)
Parameters
enabled
boolValue to set. Equal to true by default.
Returns
SetInjectablePropertyType(Type)
Sets the InjectablePropertyType of this instance.
IDependencyContainerConfigurationBuilder SetInjectablePropertyType(Type openGenericType)
Parameters
openGenericType
TypeType to set.
Returns
Exceptions
- DependencyContainerBuilderConfigurationException
When the provided type is not an open generic type or contains more than one generic argument or does not have a constructor that accepts a single parameter of the generic argument type.
SetOptionalDependencyAttributeType(Type)
Sets the OptionalDependencyAttributeType of this instance.
IDependencyContainerConfigurationBuilder SetOptionalDependencyAttributeType(Type attributeType)
Parameters
attributeType
TypeType to set.
Returns
Exceptions
- DependencyContainerBuilderConfigurationException
When the provided type is a generic type definition or does not extend the Attribute type or is not valid on parameters and fields and properties.