/// <summary> /// Raises the search failed event. /// </summary> /// <param name="e">The event argument.</param> protected virtual void OnSearchFailed(EventArgs e) { if (SearchFailed != null) { SearchFailed.GetInvocationList().InvokeEventGUIThreadSafe(this, e); } }
public async Task Search(string location) { string format = string.Format(location_search_url_template, location, settings.Locale); string page = await GetPage(format); if (page == null) { SearchFailed?.Invoke(this, new EventArgs()); return; } SearchDataReceived?.Invoke(this, SearchDataReceivedEventArgs.Report(page)); }