Armature.Interface 1.2.1

.NET Standard 2.0

Requires NuGet 2.8 or higher.

Install-Package Armature.Interface -Version 1.2.1
dotnet add package Armature.Interface --version 1.2.1
<PackageReference Include="Armature.Interface" Version="1.2.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Armature.Interface --version 1.2.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Armature.Interface, 1.2.1"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install Armature.Interface as a Cake Addin
#addin nuget:?package=Armature.Interface&version=1.2.1

// Install Armature.Interface as a Cake Tool
#tool nuget:?package=Armature.Interface&version=1.2.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

If Armature has done you any good, consider support my future initiatives

PayPal


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
.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
MonoAndroid monoandroid
MonoMac monomac
MonoTouch monotouch
Tizen tizen40 tizen60
Xamarin.iOS xamarinios
Xamarin.Mac xamarinmac
Xamarin.TVOS xamarintvos
Xamarin.WatchOS xamarinwatchos
Compatible target framework(s)
Additional computed target framework(s)
Learn more about Target Frameworks and .NET Standard.
  • .NETStandard 2.0

    • No dependencies.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Armature.Interface:

Package Downloads
Armature.Core

The core part of the Armature framework, can be used to build your own framework with syntax and features of your choice

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.2.1 116 3/16/2022
1.1.4 384 4/3/2021
1.0.68 961 11/17/2020
1.0.63 1,556 7/23/2020
1.0.57 468 7/22/2020
1.0.56 494 6/12/2020
1.0.47 570 10/24/2019
1.0.45 3,975 5/22/2019
1.0.44 1,215 2/8/2019
1.0.42 1,757 8/9/2018
1.0.41 811 8/7/2018
1.0.39 837 7/25/2018
1.0.38 912 7/17/2018
1.0.37 1,111 6/24/2018
1.0.34 842 6/4/2018
1.0.2 781 5/16/2018
1.0.0 659 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.