I am attempting to use Ninject with my application logging wrapper.
Here is the wrapper:
public class NLogLogger : ILogger
{
private readonly Logger
Assuming that your classes look like this:
public class EntityObject
{
public ILogger Logger { get; set; } //it is better by the way to convert this into a private field
public EntityObject(ILogger logger)
{
Logger = logger;
}
}
You would need to register your NLogLogger
like this:
Bind<ILogger>().To<NLogLogger>()
.WithConstructorArgument(
typeof(Type),
x => x.Request.ParentContext.Plan.Type);