private void OnBuildStarting(object sender, BuildStartingEventArgs e) { this.processorComplete = false; this.buildComplete = false; this.processor = new ReferenceVerifierProcessor(this.DesignerContext, DispatcherPriority.Background); this.processor.Complete += new EventHandler(this.OnProcessorComplete); this.processor.Begin(); }
private void OnProcessorComplete(object sender, EventArgs e) { this.processorComplete = true; if (this.processor == null) { return; } this.invalidReferences = this.processor.InvalidReferences; this.processor = (ReferenceVerifierProcessor)null; this.ReportErrorsIfAppropriate(); }
public void Unhook() { if (this.processor != null) { this.processor.Kill(); this.processor = (ReferenceVerifierProcessor)null; } if (this.DesignerContext.ProjectManager == null) { return; } this.DesignerContext.ProjectManager.BuildManager.BuildStarting -= new EventHandler <BuildStartingEventArgs>(this.OnBuildStarting); this.DesignerContext.ProjectManager.BuildManager.BuildCompleted -= new EventHandler <BuildCompletedEventArgs>(this.OnBuildCompleted); }