/// <summary> /// Initializes a new instance of the <see cref="ApplicationCentral"/> class. /// </summary> /// <param name="communicationLayer">The layer from which incoming messages are received.</param> /// <param name="connectionStateInformation">The object that stores information about the current connections and received messages.</param> public ApplicationCentral( ICommunicationFacade communicationLayer, ConnectionViewModel connectionStateInformation) { m_CommunicationLayer = communicationLayer; m_CommunicationLayer.OnEndpointConnected += (s, e) => OnEndpointSignedOn(e.Endpoint); m_CommunicationLayer.OnEndpointDisconnected += (s, e) => OnEndpointSignedOff(e.Endpoint); m_ConnectionStateInformation = connectionStateInformation; }
internal void initialise() { this.communicationFacade = new CommunicationFacade(this); this.wactchdogFacade = new WatchdogFacade(this); this.incommingCommunication = new IncomingCommunicator(this); this.liveData = new LiveData(this); Thread thread = new Thread(new ThreadStart(incommingCommunication.listenForConnections)); thread.Start(); }
private void App_OnStartup(object sender, StartupEventArgs e) { StateViewModel = new State(); CommunicationFacade = new CommunicationFacade(StateViewModel, new CommandFactory(StateViewModel, new ClientServiceProxy(SampleAddress))); }