private static void wc_DownloadStringCompleted(object sender, DownloadStringCompletedEventArgs e) { try { Log.Logger.DebugFormat("Check for New Version = {0}", e.Result); SynchronizationDispatcher.Invoke(() => { CheckInternal(e.Result); }); } catch (Exception ex) { Log.Logger.Warn(ex); } }
protected void RaisePropertyChanged(string propertyName) { if (string.IsNullOrWhiteSpace(propertyName)) { throw new ArgumentNullException("propertyName"); } var handler = this.PropertyChanged; if (null == handler) { return; } SynchronizationDispatcher.Invoke(() => { handler(this, new PropertyChangedEventArgs(propertyName)); }); }