private static void client_DownloadStringCompleted(object sender, DownloadStringCompletedEventArgs e) { var error = e.Error; FeaturedPluginsResponse response = null; if (e.Error == null && !e.Cancelled && !string.IsNullOrEmpty(e.Result)) { try { response = JsonConvert.DeserializeObject <FeaturedPluginsResponse>(e.Result); } catch (Exception ex) { Utilities.Logging.GetLogger().Error("An error occured while fetching featured plugins JSON.", ex); error = ex; } } if (Completed != null) { Completed(null, new FeaturedPluginsResponseEventArgs(response, error, e.UserState)); } }
public FeaturedPluginsResponseEventArgs(FeaturedPluginsResponse response, Exception exception, object userState) { Response = response; Error = exception; UserState = userState; }
public FeaturedPluginsResponseEventArgs(FeaturedPluginsResponse response, Exception exception, object userState) { Response = response; Error = exception; UserState = userState; }