//============================================================
        //	CLASS SUMMARY
        //============================================================
        /// <summary>
        /// Provides example code for the TrackbackClient class.
        /// </summary>
        public static void ClassExample()
        {
            #region TrackbackClient
            // Initialize the Trackback peer-to-peer notification protocol client
            TrackbackClient client = new TrackbackClient();
            client.Host = new Uri("http://www.example.com/trackback/5");

            // Construct the trackback message to be sent
            TrackbackMessage message = new TrackbackMessage(new Uri("http://www.bar.com/"));
            message.Encoding   = Encoding.UTF8;
            message.WeblogName = "Foo";
            message.Title      = "Foo Bar";
            message.Excerpt    = "My Excerpt";

            // Send a synchronous trackback ping
            TrackbackResponse response = client.Send(message);

            // Verify response to the trackback ping
            if (response != null)
            {
                if (response.HasError)
                {
                    // Use the TrackbackResponse.ErrorMessage property to determine the reason the trackback ping failed
                }
            }
            #endregion
        }
Exemple #2
0
 protected override bool GetTrackbackSent(TrackbackMessage message)
 {
     Message.Add(message.ToString());
     return(true);
 }