EZServiceLocator 1.0.4

Do you need a service locator with automated dependency injection support? No need for heavyweight IoC Containers with so many options and functionalities? This libary provides exactly this!!!

Install-Package EZServiceLocator -Version 1.0.4
dotnet add package EZServiceLocator --version 1.0.4
<PackageReference Include="EZServiceLocator" Version="1.0.4" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add EZServiceLocator --version 1.0.4
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Build status
Nuget count

##Introduction
You need a service locator with automated dependency injection support?
No need for heavyweight IoC Containers with so many options and functionalities?
This library provides exactly this!!!

##Sample mapping class

public class TestAppMap : ServiceMap
{
    public override void Load()
    {
        For<INavigationRepository>().Use<NavigationCassandraRepository>();
        For<ITracker>().Use<Tracking>(new ConstructorDependency(typeof(INavigationRepository)));
    }
}

##Specific mapping

ServiceLocator.Current.For<INavigationRepository>().Use<NavigationMsSqlRepository>();

##Named instance mapping

ServiceLocator.Current.For<INavigationRepository>("sql").Use<NavigationMsSqlRepository>();

##Self mapping

ServiceLocator.Current.Use<TestAppMap>();

##Service get

ServiceLocator.Current.LoadServiceMap<TestAppMap>();

##Named instance get

ServiceLocator.Current.GetService<INavigationRepository>("sql");

##Upcoming updates

  • Support to named instance injection
  • Support to property injection
  • JSON mapping

Build status
Nuget count

##Introduction
You need a service locator with automated dependency injection support?
No need for heavyweight IoC Containers with so many options and functionalities?
This library provides exactly this!!!

##Sample mapping class

public class TestAppMap : ServiceMap
{
    public override void Load()
    {
        For<INavigationRepository>().Use<NavigationCassandraRepository>();
        For<ITracker>().Use<Tracking>(new ConstructorDependency(typeof(INavigationRepository)));
    }
}

##Specific mapping

ServiceLocator.Current.For<INavigationRepository>().Use<NavigationMsSqlRepository>();

##Named instance mapping

ServiceLocator.Current.For<INavigationRepository>("sql").Use<NavigationMsSqlRepository>();

##Self mapping

ServiceLocator.Current.Use<TestAppMap>();

##Service get

ServiceLocator.Current.LoadServiceMap<TestAppMap>();

##Named instance get

ServiceLocator.Current.GetService<INavigationRepository>("sql");

##Upcoming updates

  • Support to named instance injection
  • Support to property injection
  • JSON mapping

Release Notes

- Easy Service Mapping
- Named Instances
- NO NINJECT

Dependencies

This package has no dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
1.0.4 448 5/22/2018
1.0.3 834 11/19/2015
1.0.2 432 11/17/2015
1.0.1 473 9/9/2015
1.0.0 734 6/16/2015