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(); }
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!"); } }
public void Eating() { chan.Eating(); }