void changeGroupService_PreChangeGroupSaved(object sender, ChangeGroupEventArgs e) { // Only invoke the AnalysisAddins configured for the source (left) side of this sync pass // This is consistent with the invocation pattern of AnalysisAddins in the SessionWorker class: we only // want to invoke AnalysisAddins on the source side if (e.SourceId == SourceMigrationSourceId) { IAnalysisProvider analysisProvider; if (!m_analysisProviders.TryGetValue(e.SourceId, out analysisProvider)) { Debug.Fail("AnalysisProvider not found with migrationSourceId: " + e.SourceId); return; } foreach (AnalysisAddin analysisAddin in m_addinManagementService.GetMigrationSourceAnalysisAddins(e.SourceId)) { Debug.Assert(m_analysisContextsByMigrationSource.ContainsKey(e.SourceId)); Debug.Assert(m_analysisProviders.ContainsKey(e.SourceId)); AnalysisContext analysisContext; if (m_analysisContextsByMigrationSource.TryGetValue(e.SourceId, out analysisContext)) { try { analysisAddin.PostChangeGroupDeltaComputation(analysisContext, e.ChangeGroup); } catch (Exception ex) { ProcessAddinException(analysisAddin, e.SourceId, ex); } } } } }
internal void FirePostChangeGroupSaved(ChangeGroup changeGroup) { if (PostChangeGroupSaved != null) { ChangeGroupEventArgs eventArgs = new ChangeGroupEventArgs(m_changeGroupManager.SourceId, changeGroup); PostChangeGroupSaved(this, eventArgs); } }