LinFu とのインターフェース用の動的プロキシを構築しようとしています。プロキシは、インターフェイスによって定義されたプロパティの getter メソッドを実装し、たとえばキーがプロパティ名であるディクショナリから値を返す必要があります。
1647 次
1 に答える
5
試す:
// 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...
于 2009-01-18T09:59:00.853 に答える