コード例 #1
0
        public void Test()
        {
            IDoStuff actual = new ActualDoStuff();
            actual.Foo();

            RealProxySample realProxy = new RealProxySample(typeof(IDoStuff), actual);
            IDoStuff wrapper = (IDoStuff) realProxy.GetTransparentProxy();

            wrapper.Foo();
        }
コード例 #2
0
        public void Test()
        {
            IDoStuff actual = new ActualDoStuff();

            actual.Foo();

            RealProxySample realProxy = new RealProxySample(typeof(IDoStuff), actual);
            IDoStuff        wrapper   = (IDoStuff)realProxy.GetTransparentProxy();

            wrapper.Foo();
        }