private void button1_Click(object sender, EventArgs e) { localhost.HelloIndigoServiceClient proxy = new localhost.HelloIndigoServiceClient(); proxy.HelloIndigo(this.Text); Debug.Assert(Application.MessageLoop); }
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); }
static void Main(string[] args) { using (localhost.HelloIndigoServiceClient proxy = new localhost.HelloIndigoServiceClient()) { string s = proxy.HelloIndigo("hello"); Console.WriteLine(s); Console.ReadLine(); } }
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(); } }
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(); }
void obj_Faulted(object sender, EventArgs e) { MessageBox.Show("Communication channel has faulted. Creating a new proxy instance."); m_proxy = new localhost.HelloIndigoServiceClient(); }
private void button1_Click(object sender, EventArgs e) { localhost.HelloIndigoServiceClient proxy = new localhost.HelloIndigoServiceClient(); proxy.HelloIndigo(this.Text); }
public Form1() { InitializeComponent(); this.Text += ": " + Thread.CurrentThread.ManagedThreadId; m_proxy = new localhost.HelloIndigoServiceClient(); }