Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Selecting the scope for the client in DI #460

Merged
merged 25 commits into from
Dec 3, 2022
Merged

Conversation

Kingmidas74
Copy link
Member

Add options to change DI lifetime for NClient.

  1. general Add.. methos now has optional parameter ServiceLifeTime (singleton by default)
  2. Many new extensions like Add...Singleton(), Add...Transient(), etc.

@Kingmidas74 Kingmidas74 linked an issue Sep 11, 2022 that may be closed by this pull request
@Kingmidas74
Copy link
Member Author

@smolchanovsky

@Kingmidas74 Kingmidas74 self-assigned this Sep 11, 2022
@sonarcloud
Copy link

sonarcloud bot commented Sep 11, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 6 Code Smells

37.0% 37.0% Coverage
0.0% 0.0% Duplication

@Kingmidas74 Kingmidas74 linked an issue Sep 11, 2022 that may be closed by this pull request
@smolchanovsky smolchanovsky removed a link to an issue Sep 11, 2022
@smolchanovsky
Copy link
Member

Great job! But the test coverage is confusing: 37.0% Coverage

@Kingmidas74
Copy link
Member Author

Great job! But the test coverage is confusing: 37.0% Coverage

So... which type of test do you want? There are only method overloads without any logic. I'm open to any offers

@smolchanovsky smolchanovsky added this to the 0.14.0 milestone Sep 11, 2022
@smolchanovsky
Copy link
Member

Great job! But the test coverage is confusing: 37.0% Coverage

So... which type of test do you want? There are only method overloads without any logic. I'm open to any offers

I agree with you, logic is pretty simple, but we should have tests to protect us from typos. For example, method must create singleton instance, but creates scoped

@Kingmidas74
Copy link
Member Author

Great job! But the test coverage is confusing: 37.0% Coverage

So... which type of test do you want? There are only method overloads without any logic. I'm open to any offers

I agree with you, logic is pretty simple, but we should have tests to protect us from typos. For example, method must create singleton instance, but creates scoped

so.. is it enough now?

Copy link
Member

@smolchanovsky smolchanovsky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool!

@sonarcloud
Copy link

sonarcloud bot commented Dec 3, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 7 Code Smells

62.8% 62.8% Coverage
0.0% 0.0% Duplication

@Kingmidas74 Kingmidas74 merged commit 261fa3d into main Dec 3, 2022
@Kingmidas74 Kingmidas74 deleted the feature/449-DI-levels branch December 3, 2022 10:12
smolchanovsky pushed a commit that referenced this pull request Dec 4, 2022
smolchanovsky added a commit that referenced this pull request Dec 4, 2022
This reverts commit 261fa3d.

Co-authored-by: Kingmidas74 <kingmidas1992@gmail.com>
Co-authored-by: smolchanovsky <smolchanovsky@gmail.com>
smolchanovsky added a commit that referenced this pull request Dec 4, 2022
…pull-requests

Revert "Merge pull request #460 from nclient/feature/449-DI-levels"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Selecting the scope for the client in DI
2 participants