コード例 #1
0
 public static void ContectServer()
 {
     if (Server == null)
     {
         InstanceContext instanceContext = new InstanceContext(new WcfServerCallback());
         DuplexChannelFactory <IWcfServer> channelFactory = new DuplexChannelFactory <IWcfServer>(instanceContext, "ServiceLibrary.WcfServer");
         Server = channelFactory.CreateChannel();
     }
 }
コード例 #2
0
 static WcfClient()
 {
     TheWcfServer = ChannelFactory<IWcfServer>.CreateChannel(new NetNamedPipeBinding(), new EndpointAddress("net.pipe://localhost/" + ChannelName + "/" + ObjectName + "/"));
 }