2

我如何在XML(对于温莎城堡)为以下课程设置配置?温莎XML配置的泛型

public class Repository<T> : IRepository<T> where T : class 
{ 
.... 
} 

我知道如何做到这一点的代码,但我必须使用XML文件中事先

回答

2
<component id="repository" 
    service="MyNamespace.IRepository`1, MyAssembly" 
    type="MyNamespace.Repository`1, MyAssembly"/> 
+0

非常感谢毛

谢谢!按预期工作! – 2010-03-10 20:52:09