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

Dependency Injection #37

Open
m1dst opened this issue Mar 21, 2024 · 1 comment
Open

Dependency Injection #37

m1dst opened this issue Mar 21, 2024 · 1 comment

Comments

@m1dst
Copy link

m1dst commented Mar 21, 2024

I can't seem to work out the DI requirements for v2 of this library. I've registered it how I think but the app crashes when I try to get an instance. All my other DI stuff works, but this fails. Could you perhaps provide a sample?

This is how I registered them.

builder.Services.AddScoped<INominatimWebInterface, NominatimWebInterface>();
builder.Services.AddScoped<IAddressSearcher, AddressSearcher>();
builder.Services.AddScoped<IForwardGeocoder, ForwardGeocoder>();
builder.Services.AddScoped<IReverseGeocoder, ReverseGeocoder>();
@EwoutdBoer
Copy link

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

No branches or pull requests

2 participants