Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/i-rzr-i/uniqueservicecollection
A product that can check and remove/avoid multiple and duplicate services injection in your current project.
https://github.com/i-rzr-i/uniqueservicecollection
collection dependency inject injection multiple remove service startup unique
Last synced: 3 days ago
JSON representation
A product that can check and remove/avoid multiple and duplicate services injection in your current project.
- Host: GitHub
- URL: https://github.com/i-rzr-i/uniqueservicecollection
- Owner: I-RzR-I
- License: mit
- Created: 2023-05-12T05:10:30.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-09-23T20:15:37.000Z (4 months ago)
- Last Synced: 2025-01-02T03:08:26.852Z (13 days ago)
- Topics: collection, dependency, inject, injection, multiple, remove, service, startup, unique
- Language: C#
- Homepage:
- Size: 35.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
> **Note** This repository is developed using .netstandard2.0
[![NuGet Version](https://img.shields.io/nuget/v/UniqueServiceCollection.svg?style=flat&logo=nuget)](https://www.nuget.org/packages/UniqueServiceCollection/)
[![Nuget Downloads](https://img.shields.io/nuget/dt/UniqueServiceCollection.svg?style=flat&logo=nuget)](https://www.nuget.org/packages/UniqueServiceCollection)This repository results from the necessity to avoid multiple and duplicate services injection.
This can be a problem when in solution are multiple projects and a lot of services are injected into every project, and if some of the injected services required additional services, in some cases as a result of this manipulation services may be injected multiple times in the same project. In other words circular injection.
To solve this problem are available some extension methods `AddUnique` or `CheckAndCleanUpDuplicateService` for `IServiceCollection` and `ServiceCollection`.
**In case you wish to use it in your project, u can install the package from nuget.org** or specify what version you want:
> `Install-Package UniqueServiceCollection -Version x.x.x.x`
## Content
1. [USING](docs/usage.md)
1. [CHANGELOG](docs/CHANGELOG.md)
1. [BRANCH-GUIDE](docs/branch-guide.md)