You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
VaraniumSharp provides an IHttpClient that wraps around HttpClient to make it injectable, however the class is disposable and DryIoC does not allow direct injection of disposable transients without explicitly registering them. Currently each implementation has to create a custom wrapper, however it is simple enough to provide a generic wrapper in Initiator as follows
using VaraniumSharp.Attributes;
using VaraniumSharp.Initiator.Attributes;
using VaraniumSharp.Wrappers;
using IHttpClient = VaraniumSharp.Interfaces.Wrappers.IHttpClient;
namespace Namespace
{
/// <inheritdoc />
[AutomaticContainerRegistration(typeof(IHttpClient), Priority = 1)]
[DisposableTransient]
public class HttpClientInjectableWrapper : HttpClientWrapper
{
}
}
The text was updated successfully, but these errors were encountered:
Description
VaraniumSharp provides an IHttpClient that wraps around HttpClient to make it injectable, however the class is disposable and DryIoC does not allow direct injection of disposable transients without explicitly registering them. Currently each implementation has to create a custom wrapper, however it is simple enough to provide a generic wrapper in Initiator as follows
The text was updated successfully, but these errors were encountered: