Skip to content

Improve DI #70

New issue

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

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

Already on GitHub? # to your account

Closed
Matthiee opened this issue Aug 30, 2020 · 0 comments
Closed

Improve DI #70

Matthiee opened this issue Aug 30, 2020 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@Matthiee
Copy link
Member

Matthiee commented Aug 30, 2020

Use Microsoft.Extensions.DependencyInjection instead of our own container resolver.

@Matthiee Matthiee added the enhancement New feature or request label Aug 30, 2020
@Matthiee Matthiee self-assigned this Aug 30, 2020
Matthiee added a commit that referenced this issue Sep 4, 2020
Matthiee added a commit that referenced this issue Sep 12, 2020
* Rename to BaseArgumentResolver

* Add resolvers as part of DI

* Remove obsolete IArgumentResolverFactory

* Remove IContainerResolver will be replaced with IServiceProvider

* Use IServiceProvider for resolving fixes #70

* Update readme

* Add more services to the ServiceCollection

* Use DI in printer tests

* Add IUsagePrinter to interface

* Improve DI flow

* Use ActivatorUtilities to instantiate CommandLineOption

* Use CreateInstance instead of newing up a new instance.

* Improve extension method to allow chaining

* Add basic logger

* Add logger service in tests

* Add logging in all tests!
Matthiee added a commit that referenced this issue Sep 20, 2020
* Improve Dependency Injection (#71)

* Rename to BaseArgumentResolver

* Add resolvers as part of DI

* Remove obsolete IArgumentResolverFactory

* Remove IContainerResolver will be replaced with IServiceProvider

* Use IServiceProvider for resolving fixes #70

* Update readme

* Add more services to the ServiceCollection

* Use DI in printer tests

* Add IUsagePrinter to interface

* Improve DI flow

* Use ActivatorUtilities to instantiate CommandLineOption

* Use CreateInstance instead of newing up a new instance.

* Improve extension method to allow chaining

* Add basic logger

* Add logger service in tests

* Add logging in all tests!

* Allow non generic command to be registered (#78)

* Allow non generic commands to be registered (#77)

* Refactor RegisterCommand<TCommand>

* Allow non generic commands to be discovered

* Register non generic command using model (#83)

* Allow non generic commands to be registered using models fixes #82 and improves #77

* Fix issue with registering non generic sub command

* Remove IgnoreAttribute fixes #80 (#84)

* Update version to 0.4

* Bump FluentValidation from 8.5.1 to 9.2.2 (#86)

* Bump FluentValidation from 8.5.1 to 9.2.2

Bumps [FluentValidation](https://github.com/JeremySkinner/fluentvalidation) from 8.5.1 to 9.2.2.
- [Release notes](https://github.com/JeremySkinner/fluentvalidation/releases)
- [Changelog](https://github.com/FluentValidation/FluentValidation/blob/master/Changelog.txt)
- [Commits](FluentValidation/FluentValidation@8.5.1...9.2.2)

Signed-off-by: dependabot[bot] <support@github.com>

* Fix build, upgrade fluent validation https://docs.fluentvalidation.net/en/latest/upgrading-to-9.html

* bump version in nuspec

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Matthias Beerens <3512339+Matthiee@users.noreply.github.com>

* Cleanup 0.4 release (#85)

* Refactor InitializeModel into seperate class

* Split complex ParseOptions method

* Add braces

* Split complex ParseCommands and ParseCommandsAsync method

* Refactor if statements in HelpRequested method

* Remove redundant assignment

* Remove unused usings

* Revert returning help requested state to caller

* Improve if statements

* Add xml comment

* Add more xml documentation

* Add validator xml comments

* Update sample app

* Improve test coverage

* Add xml comment

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant