private void newOutgoingConnection()
 {
     int port = Properties.Settings.Default.PortNumber;
     if (!Properties.Settings.Default.RunAsService)
     {
         port = 0;
     }
     if (port != m_port)
     {
         if (port > 0)
         {
             m_port = port;
             m_outgoingConnection = CommunicationManager.StartOutgoingConnection(
                 new FieldIdentifier("test"), "localhost", port);
             var remoteList = m_outgoingConnection.RegisterRemotePeerListChangedCallback(
                 new NodeConnection.RemotePeerListChangedHandler(
                     delegate(NodePeerList remotePeerList)
                     {
                         runtimeType.Value.SetLocalRuntimePeer(remotePeerList);
                     }
             ));
             runtimeType.Value.SetLocalRuntimePeer(remoteList);
         }
     }
 }