title: How to replace a dependency in ASP.NET core?
body: <p>In the startup.cs we have this:</p>
  
  <pre><code>    public void ConfigureServices(IServiceCollection services)
      {
          services.AddLocalization(options =&gt; options.ResourcesPath = "Resources");
      }
  </code></pre>
  
  <p>And so our Index Razor page can have this:</p>
  
  <pre><code>    public IndexModel(IStringLocalizer&lt;Strings&gt; localizer) {
  </code></pre>
  
  <p>I want to wrap the <code>localizer</code> in another class and replace it's presence in the IoC container with a singleton of the wrapper.</p>
  
  <p>The problem is that it does not appear possible to retrieve or remove entries from the container while in the <code>COnfigureServices</code> method.</p>
  
  <p>Essentially, I want to replace the registered instance provided by the <code>AddLocalization</code> call so that I don't need to replace every instance of the wrapper class's injection in the solution.</p>
  
  <p>Is this possible?</p>