private void RegisterServices(Guid sourceId) { Debug.Assert(m_serviceContainers.ContainsKey(sourceId), string.Format(MigrationToolkitResources.UnknownSourceId, sourceId)); ConflictManager conflictManagementService = new ConflictManager(sourceId); conflictManagementService.ScopeId = new Guid(m_session.Configuration.SessionUniqueId); m_serviceContainers[sourceId].AddService(typeof(ConflictManager), conflictManagementService); conflictManagementService.InitializePhase1(m_serviceContainers[sourceId]); RegisterConflictTypes(conflictManagementService); ICommentDecorationService commentDecorationService = new CommentDecorationService(m_session, m_serviceContainers[sourceId]); m_serviceContainers[sourceId].AddService(typeof(ICommentDecorationService), commentDecorationService); }
/// <summary> /// Initialize analysis services /// </summary> private void RegisterServices(Guid sourceId, RuntimeSession session) { Debug.Assert(m_serviceContainers.ContainsKey(sourceId), string.Format(MigrationToolkitResources.UnknownSourceId, sourceId)); ChangeActionRegistrationService changeActionRegistrationService = new ChangeActionRegistrationService(); m_serviceContainers[sourceId].AddService(typeof(ChangeActionRegistrationService), changeActionRegistrationService); ContentTypeRegistrationService contentTypeRegistrationService = new ContentTypeRegistrationService(); m_serviceContainers[sourceId].AddService(typeof(ContentTypeRegistrationService), contentTypeRegistrationService); ConflictManager conflictManagementService = new ConflictManager(sourceId); conflictManagementService.ScopeId = new Guid(m_session.Configuration.SessionUniqueId); m_serviceContainers[sourceId].AddService(typeof(ConflictManager), conflictManagementService); conflictManagementService.InitializePhase1(m_serviceContainers[sourceId]); RegisterGenericeConflicts(conflictManagementService); RegisterSessionSpecificConflicts(conflictManagementService, session.Configuration.SessionType); ICommentDecorationService commentDecorationService = new CommentDecorationService(m_session, m_serviceContainers[sourceId]); m_serviceContainers[sourceId].AddService(typeof(ICommentDecorationService), commentDecorationService); ChangeGroupService changeGroupService = m_serviceContainers[sourceId].GetService(typeof(ChangeGroupService)) as ChangeGroupService; if (changeGroupService != null) { changeGroupService.PreChangeGroupSaved += new EventHandler <ChangeGroupEventArgs>(changeGroupService_PreChangeGroupSaved); if (!m_changeGroupServices.ContainsKey(sourceId)) { m_changeGroupServices.Add(sourceId, changeGroupService); } } }