InjectionMap 1.5.6

Install-Package InjectionMap -Version 1.5.6
dotnet add package InjectionMap --version 1.5.6
<PackageReference Include="InjectionMap" Version="1.5.6" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add InjectionMap --version 1.5.6
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: InjectionMap, 1.5.6"
#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 InjectionMap as a Cake Addin
#addin nuget:?package=InjectionMap&version=1.5.6

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

InjectionMap is a very small and extremely lightweight IoC/DI container for .NET.  
InjectionMap allows loose coupling betweeen a client's dependencies and its own behaviour. InjectionMap promotes reusability, testability and maintainability of any part of an application.
InjectionMap supports .Net 4.5, Silverlight 5, Windows Phone 8 or higher and Windows Store apps for Windows 8 or higher.

- InjectionMap uses type mapping to reference the key/reference and the implementation.
- Instances are resolved using reflection or can be provided through a callback whitch allows you to create the instance in your own code.
- It suports a fluent syntax to help keep the code simple, small and clean.
- The desired Constructors can be marked with attributes or will be selected according to the passed arguments.
- Parameters for constructors can be injected or passed at the time of mapping as objects or as delegate expressions.
- InjectionMap is very simple and straightforward.

Bugs, issues or feature wishes can submitted on on the issues page or feel free to fork the project and send a pull request.

This package has no dependencies.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on InjectionMap:

Package Downloads

InjectionMap.Configuration is a small extension to InjectionMap for defining mappings in the application configuration file.


InjectionMap is a small extension to InjectionMap for WPF Applications. This extension allows viewmodels to be injected into the DataContext of a View (FrameworkElement).

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.5.6 1,038 10/14/2015
1.5.6-RC02 598 4/28/2015
1.5.5 908 1/22/2015
1.5.5-RC9 664 12/22/2014
1.5.5-RC8 658 12/22/2014
1.5.5-RC7 629 12/17/2014
1.5.5-RC6 649 12/16/2014
1.5.5-RC10 618 12/26/2014
1.5.4 1,292 11/4/2014
1.5.3 1,261 11/4/2014
1.5.2 1,252 11/4/2014
1.5.2-RC1 875 11/4/2014
1.5.1 779 10/13/2014
1.5.0 784 10/13/2014
1.5.0-RC1 654 10/13/2014
1.4.8 815 9/3/2014
1.4.7 830 9/2/2014
1.4.7-RC3 653 9/3/2014
1.4.7-RC2 664 9/3/2014
1.4.6 847 8/24/2014
1.4.5 822 8/18/2014
1.4.4 798 7/18/2014
1.4.3 849 5/29/2014
1.4.2 813 5/26/2014
1.4.1 796 5/20/2014
1.3.7 823 5/10/2014
1.3.5 814 5/1/2014
1.3.1 820 4/30/2014
1.2.1 848 4/29/2014
1.2.0 823 4/27/2014
1.1.0 804 4/26/2014
1.0.0 845 4/26/2014

- Ensured that InjectionMap is Mutithread tolerant
- Make Defaultconstrucor selectable with .WithConstructor() or .WithConstructor(typeof(void))
- Fixed: Possible Deadlock when using container in multiple threads
- Fixed: Resolving from a MappingContext with a null name creates a empty Componets map
- Fixed: Resolve unmapped types that are deeper in the Dependencytree caused ResolverException

- Added: PropertyInjection
- Added: Pass arguments for constructors directly in resolver method
- Added: Select constructor based on the type of the parameters needed
- Added: Pass InjectionMap.Argument as arguments instances to resolver
- Added: Set delegate providing resolved value directly in Map
- Added: Logging/Tracing
- Fixed: AsConstant didn't allways return same value
- Fixed: Resolving now gets all mapped values from the same context
- Refactored: Moved Expression Interfaces to default namespace
- Refactored: ComponentMapper - Allow access to Context from public
- Refactored: Renamed InjectionFlags.AsConstant to InjectionFlags.Singleton
- Refactored: Renamed InjectionFlags.AsSingleton to InjectionFlags.OverrideAllExisting

- Map to and reslove from a named context
- Add delegate or instance directly to Map<T>()
- Moved Initializer methods from InjectionMapper to MapInitializer

- Rename MappingContainer to MappingContext
- Added public accessor to MappingContext in InjectionMap

- Allow to pass a MappingContainer to InjectionMapper.Initialize(...)
- Constructors that have to be used can be defined when creating the map or when resolving.

- Renamed IInjectionMapper to IMapInitializer
- Moved Exceptions to base namespace
- Moved ComponentMapper to public
- InjectionMapper.Map<T>() now also maps to custom containers
- Added ExtendAll<T>() to InjectionResolver to extend all registered mappings of the type
- Changed License to Ms-PL
- Added InjectionResolver.For<T>() to resolve and extend unmapped types
- Refactored InjectionResolver.ExtendMap<T>() to simply extend existing mappings
- Added CLSComplient Attribute to assembly
- Expression Interfaces don't inherit from IComponentExpression to prevent return values showing component properties. Expression implementaitons additionaly inherit from IComponentExpression.
- Converted internal Ensure implementation to Extensionmethods
- Moved Internal implementation from Resolver, Mapping and Component to InjectionMap.Internal namespace