Exemple #1
0
 static void Main(string[] args)
 {
     var pro = new ChannelFactory<IWCFService.IService>("WcfDemo").CreateChannel();
     User user= pro.GetUser("OK");
     Console.WriteLine(user.Name);
     ((IChannel)pro).Close();
     Console.ReadKey();
 }
Exemple #2
0
 static void Main(string[] args)
 {
     var pro = new ChannelFactory<WCFIService.IData>("WcfDemo").CreateChannel();
        Console.WriteLine( pro.SampleLife("陈函"));
        UserInfo user= pro.GetUser();
        Console.WriteLine(user.ToString());
        ((IChannel)pro).Close();
        Console.ReadKey();
 }