我正在尝试使用LinFu为接口构建一个动态代理。代理应该只实现接口定义的属性的getter方法,并返回例如字典中的值,其中键是属性名称。
link text
发布于 2009-01-18 09:59:01
尝试:
// The interceptor class must implement the IInterceptor interface
var yourInterceptor = new YourInterceptor();
var proxyFactory = new ProxyFactory();
IYourInterface proxy = proxyFactory.CreateProxy<IYourInterface>(yourInterceptor);
// Do something useful with the proxy here...https://stackoverflow.com/questions/432100
复制相似问题