繁体   English   中英

使用LinFu生成动态代理

[英]Dynamic Proxy generation with LinFu

我正在尝试为与LinFu的接口建立动态代理。 代理应该只实现接口定义的属性的getter方法,并从字典中返回一个值,其中的键是属性名。

连结文字

尝试:

// 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...

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM