Example #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            localhost.HelloIndigoServiceClient proxy = new localhost.HelloIndigoServiceClient();
            proxy.HelloIndigo(this.Text);

            Debug.Assert(Application.MessageLoop);
        }
Example #2
0
        public Form1()
        {
            InitializeComponent();
            this.Text += ": " + Thread.CurrentThread.ManagedThreadId;
            m_proxy    = new localhost.HelloIndigoServiceClient();
            ICommunicationObject obj = m_proxy as ICommunicationObject;

            obj.Faulted += new EventHandler(obj_Faulted);
        }
Example #3
0
 static void Main(string[] args)
 {
     using (localhost.HelloIndigoServiceClient proxy = new localhost.HelloIndigoServiceClient())
     {
         string s = proxy.HelloIndigo("hello");
         Console.WriteLine(s);
         Console.ReadLine();
     }
 }
Example #4
0
        static void Main(string[] args)
        {
            CallbackType    c        = new CallbackType();
            InstanceContext instance = new InstanceContext(c);

            using (localhost.HelloIndigoServiceClient proxy = new Client.localhost.HelloIndigoServiceClient(instance))
            {
                proxy.HelloIndigo();
                Console.WriteLine("Press <ENTER> to terminate Client");                       Console.ReadLine();
            }
        }
Example #5
0
        static void Main(string[] args)
        {
            using (localhost.HelloIndigoServiceClient proxy = new Client.localhost.HelloIndigoServiceClient())
            {
                ThingCollection things = new ThingCollection();
                Thing           thing1 = new Thing();
                thing1.Name        = "Thing1";
                thing1.Description = "I am Thing1";
                Thing thing2 = new Thing();
                thing2.Name        = "Thing2";
                thing2.Description = "I am Thing2";

                things.Add(thing1);
                things.Add(thing2);
                proxy.SaveThings(things);

                things = proxy.GetThings();
            }

            Console.WriteLine("Press <ENTER> to terminate Client.");
            Console.ReadLine();
        }
Example #6
0
 void obj_Faulted(object sender, EventArgs e)
 {
     MessageBox.Show("Communication channel has faulted. Creating a new proxy instance.");
     m_proxy = new localhost.HelloIndigoServiceClient();
 }
Example #7
0
 private void button1_Click(object sender, EventArgs e)
 {
     localhost.HelloIndigoServiceClient proxy = new localhost.HelloIndigoServiceClient();
     proxy.HelloIndigo(this.Text);
 }
Example #8
0
 public Form1()
 {
     InitializeComponent();
     this.Text += ": " + Thread.CurrentThread.ManagedThreadId;
     m_proxy    = new localhost.HelloIndigoServiceClient();
 }