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

How to access TypeRegistrar() ??? #1285

Closed
dlandi opened this issue Aug 29, 2023 · 2 comments
Closed

How to access TypeRegistrar() ??? #1285

dlandi opened this issue Aug 29, 2023 · 2 comments

Comments

@dlandi
Copy link

dlandi commented Aug 29, 2023

This code on your documentation doesn't work because type registrar is an internal sealed class.

How do use the registrar dependency injection?

image

@phil-scott-78
Copy link
Contributor

The two paragraphs after your screenshot should point you in the right direction.

Implementation for each container is going to look different so we leave it up to the user you provide it

There are a handful of nuget packages out there that implement it for different containers too if you go looking.

@nils-a nils-a closed this as not planned Won't fix, can't repro, duplicate, stale Sep 11, 2023
@github-project-automation github-project-automation bot moved this from Todo 🕑 to Done 🚀 in Spectre Console Sep 11, 2023
@FrankRay78
Copy link
Contributor

FrankRay78 commented Sep 13, 2023

@dlandi - there is an example implementation of DI located here: https://github.com/spectreconsole/examples/tree/main/examples/Cli/Injection, including implementations of TypeRegister/Resolver within the Infrastructure sub-directory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done 🚀
Development

No branches or pull requests

4 participants