RxSharpServiceLocator 8.0.4
dotnet add package RxSharpServiceLocator --version 8.0.4
NuGet\Install-Package RxSharpServiceLocator -Version 8.0.4
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="RxSharpServiceLocator" Version="8.0.4" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="RxSharpServiceLocator" Version="8.0.4" />
<PackageReference Include="RxSharpServiceLocator" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add RxSharpServiceLocator --version 8.0.4
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: RxSharpServiceLocator, 8.0.4"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#addin nuget:?package=RxSharpServiceLocator&version=8.0.4
#tool nuget:?package=RxSharpServiceLocator&version=8.0.4
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
RxSharpServiceLocator
A lightweight, modular, plug-and-play Dependency Injection framework for .NET.
Designed to be zero-config, compile-safe, and auto-healing.
๐ฅ Key Features
- โ Zero configuration โ no registration needed
- ๐ง Auto-injection using class inheritance
- ๐ Compile-time safety with enforced DI contract
- ๐งฉ Modular and Area-based service separation
- ๐ Self-healing
Resolve<T>()
with auto-registration - ๐งผ No attributes, no startup bloat โ just code
๐ Quick Start
1. Define a DI Area
public enum AppArea
{
Application,
JobService
}
2. Create Your Root DI Container
public class AppDi : BaseDi<AppDi, AppService, AppProvider, AppArea> { }
3. Register Your Services
public class AppService(Action<Type, AppArea> reg) : SiblingOf<AppDi, AppProvider, AppArea>(reg, AppArea.Application)
{
public override void InjectSingleton(IServiceCollection services)
{
services.AddSingleton<MyMainService>();
}
public override void InjectOther()
{
AddService<OtherModule>();
}
}
4. Consume via Provider
public class AppProvider : SiblingOf<AppDi>
{
public MyMainService MainService => Di.Resolve<MyMainService>();
}
5. Use Anywhere with UseOf<TDi>
public class AppEntryPoint : UseOf<AppServiceDi>
{
public void Run()
{
var logger = Resolve<AppLoggerService>();
logger.Log("๐ App started successfully");
}
}
๐งฉ Dependency Resolution
var service = AppDi.I.Resolve<MyMainService>();
Even if it's not explicitly registered, it will be auto-resolved if it inherits from SiblingOf<,>
โ
๐ฆ NuGet
dotnet add package RxSharpServiceLocator
๐ GitHub
๐ค Author
Sourabh Maheshwari
GyanJaraHatke
๐ License
MIT
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net8.0
- Microsoft.Extensions.DependencyInjection (>= 8.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.