private void InitializeProxy() { try { Trace.WriteLine(string.Format("Initializing proxy on thread {0}", Thread.CurrentThread.GetHashCode())); TodoListCallback callback = new TodoListCallback(this); this.Title = string.Format("Todo List Client: Thread ID {0}", Thread.CurrentThread.GetHashCode()); _Proxy = new TodoListServiceDuplexProxy <TodoListCallback>(callback, "default"); _Proxy.AfterRecreateProxy += new EventHandler(_Proxy_AfterRecreateProxy); _Proxy.Subscribe(); } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void InitializeProxy() { try { Trace.WriteLine(string.Format("Initializing proxy on thread {0}", Thread.CurrentThread.GetHashCode())); TodoListCallback callback = new TodoListCallback(this); this.Title = string.Format("Todo List Client: Thread ID {0}", Thread.CurrentThread.GetHashCode()); _Proxy = new TodoListServiceDuplexProxy<TodoListCallback>(callback,"default"); _Proxy.AfterRecreateProxy += new EventHandler(_Proxy_AfterRecreateProxy); _Proxy.Subscribe(); } catch (Exception ex) { MessageBox.Show(ex.Message); } }