Exemplo n.º 1
0
        public void proc(int listIndx, int totalBlocks, AnsonResp blockResp)
        {
            Label    lbl  = new Label();
            DocsResp resp = (DocsResp)blockResp;
            string   msg  = string.Format("{0} / {1} {2} {3,:P1}",
                                          listIndx, totalBlocks, resp.clientname(), (float)resp.blockSeq() / totalBlocks);

            ui.Text = msg;
        }
Exemplo n.º 2
0
        public void TestAnsonResp()
        {
            AnsonMsg respmsg = (AnsonMsg)Anson.FromJson(respjson);

            Assert.AreEqual("ok", respmsg.code.Name());
            Assert.AreEqual(Port.update, respmsg.port.port());

            AnsonResp resp = (AnsonResp)respmsg.Body(0);

            Assert.IsNotNull(resp);
            Assert.IsNotNull(resp.map);
            SemanticObject resulved = (SemanticObject)resp.map["resulved"];

            Assert.IsNotNull(resulved);

            IDictionary    props  = resulved.props;
            SemanticObject attach = (SemanticObject)props["a_attaches"];

            Assert.IsNotNull(attach.props);
            Assert.AreEqual("00000D", attach.props["attId"]);
        }
Exemplo n.º 3
0
 public void ok(AnsonResp resp)
 {
     AlbumContext.GetInstance().State(ConnState.Disconnected);
 }
Exemplo n.º 4
0
            public void ok(AnsonResp resp)
            {
                IList rses = (IList)((AnDatasetResp)resp).Forest();

                Utils.Logi(rses);;
            }
Exemplo n.º 5
0
        public void ok(AnsonResp resp)
        {
            AlbumContext singl = AlbumContext.GetInstance();

            ui.Text = string.Format("Upload Finished. {}", resp.Msg());
        }