title: Autofac register type with constructor
body: <p>I have class:</p>
  
  <pre><code>public class FunctionExtender : IFunctionsExtender
  {
    private static IOptions&lt;Settings&gt; _settings;       
    private static ILogger&lt;FunctionExtender&gt; _logger;
  
    public FunctionExtender(IOptions&lt;Settings&gt; settings, ILogger&lt;FunctionExtender&gt; logger)
    {
      _settings = settings;
      _logger = logger;
    }
  }
  </code></pre>
  
  <p>where <code>IOptions</code> is a <code>Microsoft.Extensions.Options</code> type and <code>ILogger</code> is a <code>Microsoft.Extensions.Logging</code> type. How can I register this type in Autofac container with it parameters? I tried something like that:</p>
  
  <pre><code>var container = new ContainerBuilder();
  container.Populate(services);
  container.RegisterType&lt;FunctionExtender&gt;()
                  .WithParameter(new TypedParameter(typeof(IOptions&lt;Settings&gt;), ???));
  </code></pre>
  
  <p>but I don't know what to pass as second argument.</p>