I am using Microsoft extension dependency injection in Sitecore 8.2 update 4 with Helix Framework, below is my code:
public class TestTextHandler : IHttpHandler
{
private readonly ITest _test;
public TestTextHandler(Test test)
{
_test = test;
}
}
public interface ITest
{
}
public class Test : ITest
{
}
public class RegisterContainer : IServicesConfigurator
{
public void Configure(IServiceCollection serviceCollection)
{
serviceCollection.AddTransient<ITest, Test>();
}
}
One patch file:
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
<sitecore>
<services>
<configurator type="XX.XX.RegisterContainer, XX.XX" />
</services>
</sitecore>
</configuration>
I am getting error Constructor on type 'XX.XX.TestTextHandler' not found.