[英]Exclude namespace or assembly in Unity
Im using Unity and get problem with one of our 3rd party controls. 我正在使用Unity并遇到我们的第三方控件之一的问题。 Can i exclude a namespace, so Microsoft Unity not include this?
我可以排除名称空间,因此Microsoft Unity不包括该名称空间吗?
This is the error message 这是错误消息
[ResolutionFailedException: Resolution of the dependency failed, type = "DevExpress.Web.Internal.TabItemSpacerControlLite", name = "(none)"
[ResolutionFailedException:依赖关系的解析失败,类型=“ DevExpress.Web.Internal.TabItemSpacerControlLite”,名称=“(无)”
I found a solution. 我找到了解决方案。 One of the third party control had two constructors who took one parameter.
第三方控件之一具有两个采用一个参数的构造函数。 I had to specify which one to use.
我必须指定要使用哪个。
private static void RegisterDependencies(IUnityContainer container)
{
// TODO: Add any dependencies needed here
container
.RegisterType(typeof(TabItemSpacerControlLite), typeof(TabItemSpacerControlLite), new InjectionConstructor(typeof(TabBase)));
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.