I have a LoggedTextWriter that I would like to add to the Log property of the LinqToSql DataContext class.
My custom LoggedTextWriter has a constructor that accepts ICustomWriter, but I don't know how to insert it into the Log property.
Bind<DataContext>() .ToSelf() .InTransientScope() .WithConstructorArgument("connection", @"Data Source=localhost\sqlexpress2008;Initial Catalog=MyDB;Integrated Security=True") .WithPropertyValue("ObjectTrackingEnabled", true) .WithPropertyValue("Log", **<HowDoIGetAnInstanceOfLoggedTextWriter>**); Bind<LoggedTextWriter>().ToSelf().InTransientScope(); Bind<ICustomWriter>().To<MyCustomWriter>().InTransientScope();
user76071
source share