void DomLoaded (object sender, ProjectDomEventArgs e) { if (e.ProjectDom.Project != project) return; ProjectDomService.DomRegistered -= DomLoaded; subscribedDomLoaded = false; System.Threading.ThreadPool.QueueUserWorkItem (delegate { DomLoaded (e.ProjectDom); }); }
void UpdateRegisteredDom(object sender, ProjectDomEventArgs e) { if (dom == null || dom.Project == null) { return; } var project = e.ProjectDom != null ? e.ProjectDom.Project : null; if (project != null && project.FileName == dom.Project.FileName) { dom = e.ProjectDom; } }
void DomLoaded(object sender, ProjectDomEventArgs e) { if (e.ProjectDom.Project != project) { return; } ProjectDomService.DomRegistered -= DomLoaded; subscribedDomLoaded = false; System.Threading.ThreadPool.QueueUserWorkItem(delegate { DomLoaded(e.ProjectDom); }); }
static void OnDomRegistered (ProjectDomEventArgs e) { EventHandler<ProjectDomEventArgs> handler = DomRegistered; if (handler != null) handler (null, e); }