private void UpdateServerInfo() { try { var pushService = new PushServiceClient(); pushService.GetServerInfoCompleted += (s1, e1) => { try { pushService.CloseAsync(); if (e1.Result != null) { Dispatcher.BeginInvoke(() => { PushPattern = e1.Result.PushPattern; Counter = e1.Result.Counter; }); } } catch (Exception ex) { ex.Show(); } }; pushService.GetServerInfoAsync(); } catch (Exception ex) { ex.Show(); } }