python (65.1k questions)
javascript (44.2k questions)
reactjs (22.7k questions)
java (20.8k questions)
c# (17.4k questions)
html (16.3k questions)
r (13.7k questions)
android (12.9k questions)
AutoFac - Resolve But Pass Specific Constructor Value
I need to scan an assembly and, for each type that implements some interface (let's say IFoo) I need to register it with the container for later resolution. Say I have an IFoo class that takes 2 param...
Will Comeaux
Votes: 0
Answers: 0
Unable to configure Autofac to inject Serilog as implementation of ILogger in .NET 6 web app
I'm struggling to configure Serilog as the implementation for ILogger via Autofac in a .NET 6 web app.
Here's what I have so far...
var configuration = new ConfigurationBuilder().AddJsonFile("app...
awj
Votes: 0
Answers: 1
How to do something with the parameter used in creating a new instance in AutoFac?
I am looking to do something like this:
(Free handed)
container.RegisterType<MyParam>().InstancePerDependency();
container.RegisterType<MyType>().WithParameter<MyParam>((ctx, myPar...
helaj80024
Votes: 0
Answers: 0
RegisterGenericDecorator ignores condition
Conditions:
Autofac: 4.9.1
.NET Framework: 4.7.2
I have a generic command handler:
public interface ICommand<TResult> : IValidatableObject
{
}
public interface ICommandHandler<TCommand, TR...
Marcin Wasik
Votes: 0
Answers: 1