谢谢!
是的,抽象类的工作方式与接口完全相同。
var container = new Container(x => x.For<WorkerBase>().Use<RealWorker>()); var worker = container.GetInstance<WorkerBase>();