示例#1
0
    /// <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); });
        }
    }
示例#2
0
 static void Post_Saved(object sender, SavedEventArgs e)
 {
     if (e.Action != SaveAction.Update)
     BuildPostList();
 }
示例#3
0
 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);
     }
 }
示例#4
0
 static void Post_Saved(object sender, SavedEventArgs e)
 {
     if (e.Action == SaveAction.Delete)
         BindComments();
 }
示例#5
0
 static void Post_Saved(object sender, SavedEventArgs e)
 {
     if (e.Action != SaveAction.Update)
         BindMonths();
 }