コード例 #1
0
        private static void TestDynamicProxy()
        {
            var proxy = (ITest)SecurityInterceptor.Inject(new TargetClass());

            proxy.TestFunctionOne();
            proxy.TestFunctionTwo(new object(), new object());
        }
コード例 #2
0
        private static void TestStaticProxy()
        {
            var handler = new SecurityInterceptor(new TargetClass());
            var proxy   = new TargetClassStaticProxy(handler, typeof(TargetClass));

            proxy.TestFunctionOne();
            proxy.TestFunctionTwo(new object(), new object());
        }