Exemple #1
0
        public static void RunClass()
        {
            ProxyGenerator       generator   = new ProxyGenerator();
            MyExampleInterceptor interceptor = new MyExampleInterceptor();
            IOCInterceptor       another     = new IOCInterceptor();
            MyExampleClass       test        = generator.CreateClassProxy <MyExampleClass>(interceptor, another);

            Console.WriteLine($"the type of current class: {test.GetType()}, parent type: {test.GetType().BaseType}");
            test.MethodInterceptor();
            Console.WriteLine();
            test.MethodNoInterceptor();
        }
Exemple #2
0
        static void Main(string[] args)
        {
            MyExampleClass ec = new MyExampleClass();

            ec.MyMethod();
        }