/// <summary> /// Deletes the subscription. /// </summary> /// <param name="subscription">The subscription.</param> /// <returns></returns> public bool DeleteSubscription(Subscription subscription) { return this.ServiceAdapter.DeleteSubscription(subscription); }
/// <summary> /// Deletes the subscription. /// </summary> /// <param name="subscription">The subscription.</param> /// <returns></returns> public bool DeleteSubscription(Subscription subscription) { bool destroyed = false; Drop drop = subscription.Drop; Hashtable parameters = new Hashtable(); HttpWebRequest request = this.CreateUrlEncodedRequest("DELETE",this.CreateSubscriptionUrl(drop.Name, subscription.Id), parameters); CompleteRequest(request, (HttpWebResponse response) => { destroyed = true; }); return destroyed; }
/// <summary> /// Creates the and map subscription. /// </summary> /// <param name="d">The d.</param> /// <param name="node">The node.</param> /// <returns></returns> protected Subscription CreateAndMapSubscription(Drop d, XmlNode node) { Subscription s = new Subscription(); this.MapSubscription(d, s, node); return s; }
/// <summary> /// Maps the subscription. /// </summary> /// <param name="subscription">The subscription.</param> /// <param name="drop">The drop.</param> /// <param name="node">The node.</param> protected void MapSubscription(Drop drop, Subscription subscription, XmlNode node) { subscription.Id = this.ExtractInt(node, "id"); //subscription.Message = this.ExtractInnerText(node, "message"); subscription.Type = this.ExtractInnerText(node, "type"); //subscription.Username = this.ExtractInnerText(node, "username"); subscription.Url = this.ExtractInnerText(node, "url"); subscription.Drop = drop; }