Exemple #1
0
        public void ReceiveCompleted(String body)
        {
            if (String.IsNullOrEmpty(body))
            {
                return;
            }

            try
            {
                var result = new PageBuilder().BuildPage(body, 0);

                NSoup.Nodes.Document doc = NSoup.NSoupClient.Parse(result);

                result = doc.OuterHtml();

                Signal_Excute("GlobalHub", x => { x.Invoke("CompileEvent", 0, result); });
            }
            catch (Exception ex)
            {
                Signal_Excute("GlobalHub", x => { x.Invoke("CompileEvent", 1, ex.Message); });
            }
        }
Exemple #2
0
        public void ReceiveCompleted(String body)
        {
            if (String.IsNullOrEmpty(body))
            {
                return;
            }
            var globalHub    = ConfigurationManager.AppSettings["GlobalHub"];
            var compileEvent = ConfigurationManager.AppSettings["CompileEvent"];

            try
            {
                var result = new PageBuilder().BuildPage(body, 0);

                NSoup.Nodes.Document doc = NSoup.NSoupClient.Parse(result);

                result = doc.OuterHtml();

                Signal_Excute(globalHub, x => { x.Invoke(compileEvent, 0, result); });
            }
            catch (Exception ex)
            {
                Signal_Excute(globalHub, x => { x.Invoke(compileEvent, 1, ex.Message); });
            }
        }