コード例 #1
0
        public static CommandProxy Create(Type type)
        {
            var generator = new ProxyGenerator();
            var interceptor = new CountingInterceptor();

            var proxy = generator.CreateInterfaceProxyWithoutTarget(type, interceptor);

            return new CommandProxy(interceptor, proxy);
        }
コード例 #2
0
 public CommandProxy(CountingInterceptor interceptor, object proxy)
 {
     Proxy = proxy;
     Interceptor = interceptor;
 }
コード例 #3
0
 private ObserverProxy(CountingInterceptor interceptor, object proxy)
 {
     Proxy = proxy;
     Interceptor = interceptor;
 }