将StructureMap转换为Autofac

时间:2016-04-22 16:51:30

标签: autofac structuremap

有谁知道如何将其转换为Autofac语法?

private static IElementGenerator<T> GetGenerator<T>(T model) where T : class
{
      var library = StructuremapMvc.ParentScope.CurrentNestedContainer.GetInstance<HtmlConventionLibrary>();
      return ElementGenerator<T>.For(library, t => StructuremapMvc.ParentScope.CurrentNestedContainer.GetInstance(t), model);
}

以下是代码的链接

https://github.com/jbogard/ContosoUniversity/blob/master/src/ContosoUniversity/Infrastructure/HtmlHelperExtensions.cs

0 个答案:

没有答案