abstractions
abstractions copied to clipboard
Unity.Abstractions package
It seems that .NET Foundation link was broken. Fixed it to point to: https://dotnetfoundation.org/projects/project-detail/unity-container-(unity)
# ResolverOverride During resolution, types derived from `ResolverOverride` are used to provide dependency values that override those resolved from the container. ## Problem ```C# public abstract class ResolverOverride { ....
### Description Class `TypeBasedOverride` allows targeting overrides to specific type. It creates a wrapper around regular `ResolverOverride` instance and sets Target during initialization. ### Problem This design creates performance and...
### Description When a parameter is overridden with code like this: `new InjectionParameter(new InjectionParameter(overridden)` resolution fails. ### To Reproduce ```C# [TestMethod] public void SomeDescriptiveName() { var container = new UnityContainer()...
### Description `DependencyOverride` does not implement a constructor that would take a `name` parameter. ### Problem The `DependencyOverride` class declared with only one constructor that takes value of the override....
# IResolveContext interface During resolution, the `IResolveContext` interface provides a way for the build pipeline to resolve dependencies. ## Usage It is used in every resolver pipeline as this: ```C#...
# `ILifetimeContainer` interface Lifetime container holds references to disposable instances the container created or registered. It is responsible for properly disposing of these objects once the container goes out of...
### Description The extension must provide overrides for each possible combination of input values.
### Description The method `OnType(Type targetType)` creates an array of parameter overrides targeted to specific type. The method does not return proper array. ### To Reproduce ```C# [TestMethod] public void...
# DependencyOverride The `DependencyOverride` provides an override for any resolved dependency that matches the contract. ## Usage Override is passed to the `Resolve` method alone with `Type` and `Name` of...