Exemplo n.º 1
0
        private void Form1_Load(object sender, EventArgs e)
        {
            _WCFWrapper_01 = new WCFWrapper_01();
            _WCFWrapper_02 = new WCFWrapper_02();
            //_WCFWrapper_01.SourceInfo = "net.tcp://localhost:8001/FwkService";
            //_WCFWrapper_02.SourceInfo = "net.tcp://localhost:8001/FwkService";
            wrap_provider w   = comboProviders.SelectedItem as wrap_provider;
            StringBuilder str = new StringBuilder("Wrapper name: " + w.Name);

            str.AppendLine();
            str.AppendLine("SourceInfo: " + w.SourceInfo);
            str.AppendLine("WrapperProviderType: " + w.WrapperProviderType);
            str.AppendLine("ApplicationId: " + w.ApplicationId);
            textBox1.Text = str.ToString();
        }
Exemplo n.º 2
0
        private void comboProviders_SelectedIndexChanged(object sender, EventArgs e)
        {
            wrap_provider w = comboProviders.SelectedItem as wrap_provider;

            if (w == null)
            {
                return;
            }
            StringBuilder str = new StringBuilder("Wrapper name: " + w.Name);

            str.AppendLine();
            str.AppendLine("SourceInfo: " + w.SourceInfo);
            str.AppendLine("WrapperProviderType: " + w.WrapperProviderType);
            str.AppendLine("ApplicationId: " + w.ApplicationId);
            textBox1.Text = str.ToString();
        }
Exemplo n.º 3
0
        private void btnCheckServiceAvailability_Click(object sender, EventArgs e)
        {
            wrap_provider w = comboProviders.SelectedItem as wrap_provider;

            try
            {
                //using (Stream s = new MemoryStream())
                //{
                //    BinaryFormatter formatter = new BinaryFormatter();
                //    formatter.Serialize(s, w);
                //    long x = s.Length;
                //}


                var res = WrapperFactory.GetWrapper(w.Name).CheckServiceAvailability(true, true, true);
            }
            catch (Exception ex)
            {
                txtResponse.Text = ex.Message;
            }
        }