我有一個相當古老的項目,需要一些工作做就可以了,我已經在的NuGet運行更新包,現在得到我TypeRegistry以下SetAllProperties方法structuremap丟失的註冊表
名稱「SetAllProperties」在當前範圍內不存在
的TypeRegistry如下
public class TypeRegistry : Registry
{
public TypeRegistry()
{
For<ILogger>().Singleton().Use<Log4NetLogger>();
this.SetAllProperties(p => p.OfType<ILogger>());
}
}
誰能解釋爲什麼是這樣的情況下,並點我的任何事情可以幫助我解決這個問題,請。
圍繞 「當前範圍」。如果作用域包含另一個名爲「Registry」的接口或類,那麼你將得到這個編譯錯誤。嘗試輸入全名,而不是StructureMap.Configuration.DSL.Registry。 –