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(); }
static void Main(string[] args) { MyExampleClass ec = new MyExampleClass(); ec.MyMethod(); }