Ejemplo n.º 1
0
        /// <summary>
        /// The Test
        /// </summary>
        public static void Test()
        {
            //AutofacHelper.Register<ITest1, Test1>();
            AutofacHelper.Register <ITest1, Test1, TestIinterceptor>();
            var it1 = AutofacHelper.Resolve <ITest1>();

            it1.TestMethod();
            Console.WriteLine("--------");
            var ss2 = it1.TestMethod2(1212);

            Console.WriteLine("--------");
            var ss3 = it1.TestMethod3(1212, "fsafasfasfsaf");

            Console.WriteLine("--------");
            var ss4 = it1.TestMethod4(null);

            Console.WriteLine("--------");
            var ss5 = it1.TestMethod4(new TestObj {
                MyProperty = 2132131, MyProperty2 = "afljlfajflsa"
            });

            Console.WriteLine("--------");

            Console.WriteLine(ss2);
            Console.WriteLine(ss3);
            Console.WriteLine(ss4);
            Console.WriteLine(ss5);
        }