void Service_GetMapDataCompleted(object sender, GetMapDataCompletedEventArgs e) { mapData = e.Result; if (App.UserName != null) { App.Player = mapData.Players.SingleOrDefault(p => p.Name == App.UserName); //todo: don't use linear search? if (App.Player == null) App.Service.GetMapDataAsync(App.UserName, App.Password); } }
void Service_GetMapDataCompleted(object sender, GetMapDataCompletedEventArgs e) { mapData = e.Result; if (App.UserName != null) { App.Player = mapData.Players.SingleOrDefault(p => p.Name == App.UserName); //todo: don't use linear search? if (App.Player == null) { App.Service.GetMapDataAsync(App.UserName, App.Password); } } }