C# Unity 5.x:Where';s注册表类型<;t从,到>;?

C# Unity 5.x:Where';s注册表类型<;t从,到>;?,c#,dependency-injection,unity-container,C#,Dependency Injection,Unity Container,我正在尝试做一些类似的事情 Container.RegisterType<ISettingsService, SettingsService>(new ContainerControlledLifetimeManager()); Container.RegisterType(新ContainerControlledLifetimeManager()); 在v5之前,我使用使用Microsoft.Practices.Unity用于此。 泛型方法在v5中仍然存在吗?它在Unity.A

我正在尝试做一些类似的事情

Container.RegisterType<ISettingsService, SettingsService>(new ContainerControlledLifetimeManager());
Container.RegisterType(新ContainerControlledLifetimeManager());
在v5之前,我使用
使用Microsoft.Practices.Unity用于此。

泛型方法在v5中仍然存在吗?

它在
Unity.Abstractions
包的命名空间
Unity
中,所以

using Unity;

应该足够了。

谢谢!。我不明白为什么VS2017不能建议使用Unity
。通常是这样。只是好奇为什么它不适合这个。我重建了,但它仍然不能建议。Resharper有,你是说Resharper能够建议吗?它为我做了(我想是2017.2.2)