1
使用Castle.DynamicProxy,我“简单地”想得到一个Interface-Proxy-Without-Target,但是...使用默认构造函数,所以我能够重用代理 - 类型。使用默认的构造函数创建一个InterfaceProxyWithoutTarget
UPDATE
我的意思是做这样的事情......
var proxy = generator.CreateInterfaceProxyWithoutTarget(typeof(TInterface) ...);
var proxyType = proxy.GetType();
var newproxy = Activator.CreateInstance(proxyType);
...除了生成的类型不实现默认构造函数。
我的实际环境与WCF定制有关,但那是另一回事。
谢谢基耶斯洛夫, 我简单浏览了一下WCF基金,这可以帮助,但有这么几个文档... 我需要自托管和代码只配置功能。 – fredlegrain 2010-01-25 10:41:45
请参阅这里了解文档以及链接。 http://using.castleproject.org/display/IoC/Windsor+WCF+integration+filility 这个页面将更新一些实际的文件,希望不久:) – 2010-01-25 11:58:24
我想我知道你的意思是... :) – fredlegrain 2010-01-25 13:10:16