We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I want to create custom providers using DI. From the client's API side, it should look like this:
services.AddRestNClient<IBasicClientWithMetadata>(host: "http://localhost:5000", implementationFactory: builder => builder .WithHandling<MyHandler>() .Build());
The text was updated successfully, but these errors were encountered:
I'm sorry, but this feature already implemented, isn't? https://github.com/nclient/NClient/blob/main/tests/NClient.Extensions/NClient.Extensions.DependencyInjection.Tests/AddRestNClientExtensionsTest.cs#L73
Sorry, something went wrong.
No, there is no such feature yet. Please note how the handler is created:
.WithHandling<MyHandler>()
Now we can only create a handler like this:
services.AddRestNClient<IBasicClientWithMetadata>(host: "http://localhost:5000", implementationFactory: (serviceProvider, builder) => { var myHandler = serviceProvider.GetRequiredService<MyHandler>(); return builder .WithHandling(myHandler) .Build(); });
No branches or pull requests
I want to create custom providers using DI. From the client's API side, it should look like this:
The text was updated successfully, but these errors were encountered: