示例#1
0
        public void TestMultiChainSubscribe()
        {
            // Setup
            var processWrapper = new ProcessWrapper {
                Mock = true, ReplyMessage = "Blockchain test"
            };
            var chain = new MultiChain(null, processWrapper);

            // Test
            var str = chain.Subscribe("Test01");

            // Check
            Assert.AreEqual("Blockchain test", str);
            Assert.AreEqual("/c D:\\Development\\Eigenbouw\\bc\\MultiChain\\multichain-cli.exe testchain subscribe Test01 true", processWrapper.ProcessInfo.Arguments);
        }
示例#2
0
        public void MessageReceived(string transid)
        {
            if (this.Clients.SelectedItem != null)
            {
                berichtenontvangen += 1;
                var permissie = chain.Subscribe(Program.streamname);
                var mystream  = chain.GetStreamItem(Program.streamname, transid);
                this.enc.Text = mystream.data;

                var data        = this.chain.HexStringToBytes(mystream.data);
                var data2string = Encoding.Default.GetString(data);

                this.dec.Text        = data2string;
                aantalberichten.Text = this.berichtenontvangen.ToString();
            }
        }
示例#3
0
 private void button9_Click(object sender, EventArgs e)
 {
     var permissie = chain.Subscribe("pinjo");
 }