Exemplo n.º 1
0
    private void SetupClientCom() {
      DummyListener dummy = new DummyListener();
      try {
        pipeFactory = new DuplexChannelFactory<ISlaveCommunication>(dummy, Settings.Default.SlaveCommunicationServiceEndpoint);
      }
      catch {
        EventLogManager.LogMessage("Couldn't create pipe for SlaveClientCom with config!");

        try {
          pipeFactory = new DuplexChannelFactory<ISlaveCommunication>(dummy, new NetNamedPipeBinding(), new EndpointAddress("net.pipe://localhost/HeuristicLabSlaveCom"));
        }
        catch {
          EventLogManager.LogMessage("Couldn't create pipe for SlaveClientCom with fixed addresse!");
          return;
        }
      }
      pipeFactory.Faulted += new System.EventHandler(pipeFactory_Faulted);

      ISlaveCommunication pipeProxy = pipeFactory.CreateChannel();
      ClientCom = pipeProxy;
    }
Exemplo n.º 2
0
        private void SetupClientCom()
        {
            DummyListener dummy = new DummyListener();

            try {
                pipeFactory = new DuplexChannelFactory <ISlaveCommunication>(dummy, Settings.Default.SlaveCommunicationServiceEndpoint);
            }
            catch {
                EventLogManager.LogMessage("Couldn't create pipe for SlaveClientCom with config!");

                try {
                    pipeFactory = new DuplexChannelFactory <ISlaveCommunication>(dummy, new NetNamedPipeBinding(), new EndpointAddress("net.pipe://localhost/HeuristicLabSlaveCom"));
                }
                catch {
                    EventLogManager.LogMessage("Couldn't create pipe for SlaveClientCom with fixed addresse!");
                    return;
                }
            }
            pipeFactory.Faulted += new System.EventHandler(pipeFactory_Faulted);

            ISlaveCommunication pipeProxy = pipeFactory.CreateChannel();

            ClientCom = pipeProxy;
        }