public void Test()
        {
            IDoStuff actual = new ActualDoStuff();
            actual.Foo();

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

            wrapper.Foo();
        }
Exemple #2
0
        public void TestSimpleDynamicProxy()
        {
            IDoStuff actual = new ActualDoStuff();

            actual.Foo();

            IDoStuff wrapper = Wrapper <IDoStuff> .Wrap <IDoStuff>(actual);

            wrapper.Foo();
        }
Exemple #3
0
        public void Test()
        {
            IDoStuff actual = new ActualDoStuff();

            actual.Foo();

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

            wrapper.Foo();
        }