Created
November 27, 2019 11:10
-
-
Save chrisgate/4a081136e2c22888f64f0e55eecd8202 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void TransportUpdated(IAsciiTransport transport) | |
{ | |
if (transport.State == ConnectionState.Available) | |
{ | |
var viewModel = this.Transports.Where(vm => vm.Id == transport.Id).FirstOrDefault(); | |
if (viewModel == null) | |
{ | |
viewModel = new TransportModel(this.transportsManager, transport); | |
this.Transports.Add(viewModel); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment