Esempio n. 1
0
        static void Main(string[] args)
        {
            Console.WriteLine("Hello World!");
            ServerBase serverBase = ProxyFactory.Build(typeof(蝉));

            serverBase.Eating();
            //object[] objects = { new 蝉1() };
            //serverBase = new 螳螂1<蝉1>(new 蝉1());
            //serverBase.Eating();
        }
Esempio n. 2
0
 public void Eating()
 {
     if (type != null && serverBase != null)
     {
         if (type.Equals(typeof(蝉)))
         {
             serverBase.Eating();
             ProxyFactory.Build(typeof(螳螂)).Eating();
         }
         else if (type.Equals(typeof(螳螂)))
         {
             serverBase.Eating();
             ProxyFactory.Build(typeof(黄雀)).Eating();
         }
         else if (type.Equals(typeof(黄雀)))
         {
             serverBase.Eating();
         }
     }
     else
     {
         Console.WriteLine("nothing!");
     }
 }
Esempio n. 3
0
 public void Eating()
 {
     chan.Eating();
 }