簡體   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