public void PingReplay( [Argument("site", "s", Description = "The root http address of the website to replay on.")] string site, [Argument("source", Description = "The http address of the live website to read pingbacks from.")] string pullFrom) { PingbackClient client = new PingbackClient(site); client.LogError += Console.Error.WriteLine; client.LogInfo += Console.Out.WriteLine; client.Playback( new Uri(new Uri(pullFrom, UriKind.Absolute), "/api/pingback"), Path.Combine(StoragePath(site), "playback.bin")); }
public void Pingback( [Argument("source", "s", Description = "The http address of the web page linking to target.")] string source, [Argument("target", "t", Description = "The http address of the target paged linked from source.")] string target) { PingbackClient client = new PingbackClient(target); client.LogError += Console.Error.WriteLine; client.LogInfo += Console.Out.WriteLine; int code; string message; if (client.SendPingback(source, out code, out message)) { Console.WriteLine("Success: {0}", message); } else { Console.Error.WriteLine("FAILURE({0}): {1}", code, message); } }