public bool Publish(DebugController controller) { Debug.WriteLine("WDE: ProgramPublisher.Publish()"); // In order to guarantee that the Program Nodes are always in the MTA, publish on a separate thread. if (isPublished) { return(false); } try { this.controller = controller; Thread publisherThread = new Thread(PublisherThreadFunc); publisherThread.SetApartmentState(ApartmentState.MTA); publisherThread.IsBackground = true; publisherThread.Start(); publisherThread.Join(); } catch (Exception e) { // Eat up exceptions if the debugger is not installed. Debug.WriteLine("WDE: ProgramPublisher.Publish() exception: " + e.ToString()); } return(this.isPublished); }
public bool Publish(DebugController controller) { Debug.WriteLine("WDE: ProgramPublisher.Publish()"); // In order to guarantee that the Program Nodes are always in the MTA, publish on a separate thread. if (isPublished) return false; try { this.controller = controller; Thread publisherThread = new Thread(PublisherThreadFunc); publisherThread.SetApartmentState(ApartmentState.MTA); publisherThread.IsBackground = true; publisherThread.Start(); publisherThread.Join(); } catch (Exception e) { // Eat up exceptions if the debugger is not installed. Debug.WriteLine("WDE: ProgramPublisher.Publish() exception: " + e.ToString()); } return this.isPublished; }
public bool Publish(DebugController controller) { if (this.isPublished) { return false; } try { this.controller = controller; Thread thread = new Thread(new ThreadStart(this.PublisherThreadFunc)); thread.SetApartmentState(ApartmentState.MTA); thread.IsBackground = true; thread.Start(); thread.Join(); } catch (Exception) { } return this.isPublished; }
public bool Publish(DebugController controller) { if (this.isPublished) { return(false); } try { this.controller = controller; Thread thread = new Thread(new ThreadStart(this.PublisherThreadFunc)); thread.SetApartmentState(ApartmentState.MTA); thread.IsBackground = true; thread.Start(); thread.Join(); } catch (Exception) { } return(this.isPublished); }
public ProgramNode(DebugController controller) { this.controller = controller; }