/// <summary> /// Sends the pings in a new thread. /// <remarks> /// It opens a new thread and executes the pings from there, /// because it takes some time to complete. /// </remarks> /// </summary> private void Post_Saved(object sender, SavedEventArgs e) { if (e.Action == SaveAction.None || e.Action == SaveAction.Delete) return; IShowed item = (IShowed)sender; if (!BlogSettings.Instance.EnableTrackBackSend && !BlogSettings.Instance.EnablePingBackSend) return; if ((HttpContext.Current == null || !HttpContext.Current.Request.IsLocal) && item.IsVisible) { ThreadPool.QueueUserWorkItem(delegate { Ping(item); }); } }
static void Post_Saved(object sender, SavedEventArgs e) { if (e.Action != SaveAction.Update) BuildPostList(); }
void Post_Saved(object sender, SavedEventArgs e) { if (e.Action == SaveAction.Update) { Post post = (Post)sender; if (_Cache.ContainsKey(post.Id)) _Cache.Remove(post.Id); } }
static void Post_Saved(object sender, SavedEventArgs e) { if (e.Action == SaveAction.Delete) BindComments(); }
static void Post_Saved(object sender, SavedEventArgs e) { if (e.Action != SaveAction.Update) BindMonths(); }