示例#1
0
        private void respond_post(System.Net.HttpListenerContext context, PostInfoRecord post)
        {
            this.WriteLogMethodName();
            var method_response = new MP.XmlRpc.MethodResponse();
            var struct_         = post.ToPostInfo().ToStruct();

            method_response.Parameters.Add(struct_);
            WriteResponseString(context, method_response.CreateDocument().ToString(), 200, ContentType_TextXml);
        }
        private SXL.XElement GetPostContentElement(PostInfoRecord thepost)
        {
            this.WriteLogMethodName();
            var el_div_post = new System.Xml.Linq.XElement("div");
            var el_blog_content = el_div_post.AddH1Element(thepost.Title + (thepost.PostStatus == "draft" ? "[DRAFT]" : ""));

            var el_para_cats = el_div_post.AddParagraphElement("Categories: " + string.Join(",", thepost.Categories));
            var el_div = el_div_post.AddDivElement();

            el_div.Add(GetReplacementString(thepost));
            return el_div_post;
        }
        private SXL.XElement GetPostContentElement(PostInfoRecord thepost)
        {
            this.WriteLogMethodName();
            var el_div_post     = new System.Xml.Linq.XElement("div");
            var el_blog_content = el_div_post.AddH1Element(thepost.Title + (thepost.PostStatus == "draft" ? "[DRAFT]" : ""));

            var el_para_cats = el_div_post.AddParagraphElement("Categories: " + string.Join(",", thepost.Categories));
            var el_div       = el_div_post.AddDivElement();

            el_div.Add(GetReplacementString(thepost));
            return(el_div_post);
        }
 private string GetReplacementString(PostInfoRecord thepost)
 {
     string replacement_string = "$$$$$$$$$$" + thepost.Link + "$$$$$$$$$$";
     return replacement_string;
 }
示例#5
0
 private void respond_post(System.Net.HttpListenerContext context, PostInfoRecord post)
 {
     this.WriteLogMethodName();
     var method_response = new MP.XmlRpc.MethodResponse();
     var struct_ = post.ToPostInfo().ToStruct();
     method_response.Parameters.Add(struct_);
     WriteResponseString(context, method_response.CreateDocument().ToString(), 200, ContentType_TextXml);
 }
        private string GetReplacementString(PostInfoRecord thepost)
        {
            string replacement_string = "$$$$$$$$$$" + thepost.Link + "$$$$$$$$$$";

            return(replacement_string);
        }