/// <summary> /// delete a milestone given a valid milestone instance /// </summary> /// <param name="space"></param> /// <param name="user"></param> /// <param name="password"></param> /// <param name="milestone"></param> /// <returns></returns> public static bool DeleteMilestone(string user, string password, AssemblaMilestone milestone) { string space = milestone.Space; string url = GetMilestonesUrl(space) + "//" + milestone.Id; string result = string.Empty; return(qc.goget(url, user, password, string.Empty, SendDebug, out result)); }
/// <summary> /// delete a milestone given a valid milestone instance /// </summary> /// <param name="space"></param> /// <param name="user"></param> /// <param name="password"></param> /// <param name="milestone"></param> /// <returns></returns> public static bool DeleteMilestone(string user, string password, AssemblaMilestone milestone) { string space = milestone.Space; string url = GetMilestonesUrl(space)+"//"+milestone.Id; string result = string.Empty; return qc.goget(url, user, password, string.Empty, SendDebug, out result); }
/// <summary> /// delete a milestone given a valid milestone instance /// </summary> /// <param name="space"></param> /// <param name="user"></param> /// <param name="password"></param> /// <param name="milestone"></param> /// <returns></returns> public static bool DeleteMilestone(string user, string password, AssemblaMilestone milestone) { string space = milestone.Space; string url = GetMilestonesUrl(space) + "//" + milestone.Id; HttpWebRequest hr = WebRequest.Create(url) as HttpWebRequest; hr.Credentials = new System.Net.NetworkCredential(user, password); hr.PreAuthenticate = true; hr.Method = "GET"; hr.ContentType = "application/xml"; HttpWebResponse wr = (HttpWebResponse)hr.GetResponse(); return(wr.StatusCode == HttpStatusCode.OK); }
internal static List <AssemblaMilestone> getms(string space, string result) { XmlDocument xd = new XmlDocument(); xd.LoadXml(result); List <AssemblaMilestone> docs = new List <AssemblaMilestone>(); XmlNodeList xnl = xd.GetElementsByTagName("milestone"); foreach (XmlNode xn in xnl) { AssemblaMilestone doc = new AssemblaMilestone(); doc.Space = space; foreach (XmlNode dc in xn.ChildNodes) { string m = dc.InnerText; if (dc.Name == "id") { doc.Id = Convert.ToInt32(m); } else if (dc.Name == "space-id") { doc.SpaceId = m; } else if (dc.Name == "title") { doc.Name = m; } else if (dc.Name == "is-completed") { doc.isCompleted = Convert.ToBoolean(m); } else if (dc.Name == "description") { doc.Desc = m; } } if (doc.isValid) { docs.Add(doc); } } return(docs); }
internal static List<AssemblaMilestone> getms(string space,string result) { XmlDocument xd = new XmlDocument(); xd.LoadXml(result); List<AssemblaMilestone> docs = new List<AssemblaMilestone>(); XmlNodeList xnl = xd.GetElementsByTagName("milestone"); foreach (XmlNode xn in xnl) { AssemblaMilestone doc = new AssemblaMilestone(); doc.Space = space; foreach (XmlNode dc in xn.ChildNodes) { string m = dc.InnerText; if (dc.Name == "id") doc.Id = Convert.ToInt32(m); else if (dc.Name == "space-id") doc.SpaceId = m; else if (dc.Name == "title") doc.Name = m; else if (dc.Name == "is-completed") doc.isCompleted = Convert.ToBoolean(m); else if (dc.Name == "description") doc.Desc = m; } if (doc.isValid) docs.Add(doc); } return docs; }
/// <summary> /// delete a milestone given a valid milestone instance /// </summary> /// <param name="space"></param> /// <param name="user"></param> /// <param name="password"></param> /// <param name="milestone"></param> /// <returns></returns> public static bool DeleteMilestone(string user, string password, AssemblaMilestone milestone) { string space = milestone.Space; string url = GetMilestonesUrl(space)+"//"+milestone.Id; HttpWebRequest hr = WebRequest.Create(url) as HttpWebRequest; hr.Credentials = new System.Net.NetworkCredential(user, password); hr.PreAuthenticate = true; hr.Method = "GET"; hr.ContentType = "application/xml"; HttpWebResponse wr = (HttpWebResponse)hr.GetResponse(); return wr.StatusCode == HttpStatusCode.OK; }