Armature 1.2.1
Requires NuGet 2.8 or higher.
dotnet add package Armature --version 1.2.1
NuGet\Install-Package Armature -Version 1.2.1
<PackageReference Include="Armature" Version="1.2.1" />
paket add Armature --version 1.2.1
#r "nuget: Armature, 1.2.1"
// Install Armature as a Cake Addin
#addin nuget:?package=Armature&version=1.2.1
// Install Armature as a Cake Tool
#tool nuget:?package=Armature&version=1.2.1
If Armature has done you any good, consider support my future initiatives
Armature
Lightweight and extremely easily extensible dependency injection framework
Example of extensibility
See the project Tests.Extensibility
to see the example of powerful extensibility possibility without changing the framework itself.
It adds support for Maybe
as an injected value.
Examples of using
var builder = new Builder(BuildStage.Cache, BuildStage.Initialize, BuildStage.Create)
{
new SkipAllUnits
{
// inject into constructor
new IfFirstUnit(new IsConstructor())
.UseBuildAction(
new TryInOrder(
new GetConstructorByInjectPointId(),
new GetConstructorWithMaxParametersCount()
),
BuildStage.Create),
new IfFirstUnit(new IsParameterInfoList())
.UseBuildAction(new BuildMethodArgumentsInDirectOrder(), BuildStage.Create),
new IfFirstUnit(new IsParameterInfo())
.UseBuildAction(new BuildArgumentByParameterType(), BuildStage.Create)
}
};
builder
.TreatOpenGeneric(typeof(ISubject<>))
.AsCreated(typeof(Subject<>));
builder
.Treat<Subject>(tag)
.AsIs()
.InjectInto(Constructor.WithParameters<int, string, Stream>());
builder
.Treat<Subject>()
.AsIs()
.InjectInto(Constructor.MarkedWithInjectAttribute(Subject.InjectPointId));
builder
.Treat<ISubject>()
.AsCreated<Subject>()
.AsSingleton();
builder
.Building<ISubject>()
.Building<Subject>()
.TreatAll()
.UsingArguments(logger);
Product | Versions |
---|---|
.NET | net5.0 net5.0-windows net6.0 net6.0-android net6.0-ios net6.0-maccatalyst net6.0-macos net6.0-tvos net6.0-windows net7.0 net7.0-android net7.0-ios net7.0-maccatalyst net7.0-macos net7.0-tvos net7.0-windows |
.NET Core | netcoreapp2.0 netcoreapp2.1 netcoreapp2.2 netcoreapp3.0 netcoreapp3.1 |
.NET Standard | netstandard2.0 netstandard2.1 |
.NET Framework | net461 net462 net463 net47 net471 net472 net48 net481 |
MonoAndroid | monoandroid |
MonoMac | monomac |
MonoTouch | monotouch |
Tizen | tizen40 tizen60 |
Xamarin.iOS | xamarinios |
Xamarin.Mac | xamarinmac |
Xamarin.TVOS | xamarintvos |
Xamarin.WatchOS | xamarinwatchos |
-
.NETStandard 2.0
- Armature.Core (>= 1.2.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
1.2.1 | 253 | 3/16/2022 |
1.1.4 | 319 | 4/3/2021 |
1.0.68 | 894 | 11/17/2020 |
1.0.63 | 1,406 | 7/23/2020 |
1.0.57 | 345 | 7/22/2020 |
1.0.56 | 384 | 6/12/2020 |
1.0.47 | 433 | 10/24/2019 |
1.0.45 | 4,009 | 5/22/2019 |
1.0.44 | 1,249 | 2/8/2019 |
1.0.42 | 1,791 | 8/9/2018 |
1.0.41 | 832 | 8/7/2018 |
1.0.39 | 881 | 7/25/2018 |
1.0.38 | 1,026 | 7/17/2018 |
1.0.37 | 1,082 | 6/24/2018 |
1.0.34 | 901 | 6/4/2018 |
1.0.0 | 948 | 5/6/2018 |
** This version brokes compatibility with the version 1.1.x. **
* Many classes and methods are renamed for the sake of simplicity, the old "UnitSequenceMatcher" concept is too complex to grasp the idea.
* The order in which method/constructor arguments are built can be customized, creation build actions build "ParameterInfo[]" unit instead of enumerating
method/constructor parameters itself.
* Logging is significantly improved, now it's written in HOCON format therefore is friendly to human and can be processed by script.