Example #1
0
        /// <summary>
        /// Formats the contents of the table into a string
        /// </summary>
        /// <returns></returns>
        //  Revision History
        //  MM/DD/YY Who Version Issue# Description
        //  -------- --- ------- ------ ---------------------------------------------
        //  11/11/11 RCG 2.53.05        Created

        public override string ToString()
        {
            string TableString = "";

            // Make sure we have read all of the data first
            Read();

            TableString += "MFG Table 242 (2290) - ZigBee Reset Info\r\n";

            TableString += "   Reset Statistics:\r\n";
            TableString += "      Total ZigBee Resets = " + TotalHANResets.ToString(CultureInfo.InvariantCulture) + "\r\n";
            TableString += "      Last Reset Time = " + LastResetTime.ToString("G", CultureInfo.CurrentCulture) + "\r\n";
            TableString += "      Total Code Fatals = " + TotalCodeFatalErrors.ToString(CultureInfo.InvariantCulture) + "\r\n";
            TableString += "      Total Watchdogs = " + TotalWatchdogErrors.ToString(CultureInfo.InvariantCulture) + "\r\n";
            TableString += "      Total Faults = " + TotalCoreFaults.ToString(CultureInfo.InvariantCulture) + "\r\n";
            TableString += "      Total Stack Lockups = " + TotalStackLockups.ToString(CultureInfo.InvariantCulture) + "\r\n";
            TableString += "      Total Initial Reg Table Add = " + TotalFirstUseResets.ToString(CultureInfo.InvariantCulture) + "\r\n";
            TableString += "      High Water Mark For Reset Limiting = " + HighWaterMark.ToString(CultureInfo.InvariantCulture) + "\r\n";
            TableString += "      Current Reset Limiting Period = " + CurrentResetLimitPeriod.ToString(CultureInfo.InvariantCulture) + "\r\n";
            TableString += "      Current Reset Limiting Count = " + CurrentResetLimitCount.ToString(CultureInfo.InvariantCulture) + "\r\n";
            TableString += "      Halt Due to Over Reset Limit = " + isHaltedDueToOverResetLimit.ToString(CultureInfo.InvariantCulture) + "\r\n";

            for (int Index = 0; Index < ValidEntrySequenceNumbers.Count(); Index++)
            {
                TableString += "   Valid Entry Sequence [" + Index.ToString(CultureInfo.InvariantCulture) + "] = " + ValidEntrySequenceNumbers[Index].ToString(CultureInfo.InvariantCulture) + "\r\n";
            }

            for (int Index = 0; Index < ResetLogEntries.Count(); Index++)
            {
                TableString += "   Entries [" + Index.ToString(CultureInfo.InvariantCulture) + "]\r\n";
                TableString += ResetLogEntries[Index].ToString();
            }

            return(TableString);
        }
Example #2
0
        /// <summary>
        /// Initialize method of the analysis provider - acquire references to the services provided by the platform.
        /// </summary>
        /// <param name="serviceContainer">The service container.</param>
        public override void InitializeServices(IServiceContainer serviceContainer)
        {
            TraceManager.TraceInformation("WSSVC:AP:Initialize");
            this.analysisServiceContainer = serviceContainer;

            supportedContentTypes = new Collection <ContentType>();
            supportedContentTypes.Add(WellKnownContentType.VersionControlledFile);
            supportedContentTypes.Add(WellKnownContentType.VersionControlledFolder);

            SharePointVCChangeActionHandler handler = new SharePointVCChangeActionHandler(this);

            supportedChangeActions = new Dictionary <Guid, ChangeActionHandler>();
            supportedChangeActions.Add(WellKnownChangeActionId.Add, handler.BasicActionHandler);
            supportedChangeActions.Add(WellKnownChangeActionId.Delete, handler.BasicActionHandler);
            supportedChangeActions.Add(WellKnownChangeActionId.Edit, handler.BasicActionHandler);

            configurationService = (ConfigurationService)analysisServiceContainer.GetService(typeof(ConfigurationService));

            highWaterMarkDelta     = new HighWaterMark <DateTime>(Constants.HwmDelta);
            highWaterMarkChangeset = new HighWaterMark <int>("LastChangeSet");
            configurationService.RegisterHighWaterMarkWithSession(highWaterMarkDelta);
            configurationService.RegisterHighWaterMarkWithSession(highWaterMarkChangeset);
            changeGroupService = (ChangeGroupService)analysisServiceContainer.GetService(typeof(ChangeGroupService));
            changeGroupService.RegisterDefaultSourceSerializer(new SharePointVCMigrationItemSerializer());
        }
Example #3
0
        public override void InitializeServices(IServiceContainer analysisServiceContainer)
        {
            TraceManager.TraceInformation("POC:AP:Initialize");
            TraceManager.TraceInformation("Press enter..");
            Console.ReadLine();
            m_analysisServiceContainer = analysisServiceContainer;

            m_supportedContentTypes = new Collection <ContentType>();
            m_supportedContentTypes.Add(WellKnownContentType.VersionControlledFile);
            m_supportedContentTypes.Add(WellKnownContentType.VersionControlledFolder);

            var handler = new BasicChangeActionHandlers(this);

            m_supportedChangeActions = new Dictionary <Guid, ChangeActionHandler>();
            m_supportedChangeActions.Add(WellKnownChangeActionId.Add, handler.BasicActionHandler);
            m_supportedChangeActions.Add(WellKnownChangeActionId.Delete, handler.BasicActionHandler);
            m_supportedChangeActions.Add(WellKnownChangeActionId.Edit, handler.BasicActionHandler);
            m_supportedChangeActions.Add(WellKnownChangeActionId.Rename, handler.BasicActionHandler);

            ConfigurationService = (ConfigurationService)m_analysisServiceContainer.GetService(typeof(ConfigurationService));

            m_hwmDelta     = new HighWaterMark <DateTime>(Constants.HwmDelta);
            m_hwmChangeset = new HighWaterMark <int>("LastChangeSet");
            ConfigurationService.RegisterHighWaterMarkWithSession(m_hwmDelta);
            ConfigurationService.RegisterHighWaterMarkWithSession(m_hwmChangeset);
            m_changeGroupService = (ChangeGroupService)m_analysisServiceContainer.GetService(typeof(ChangeGroupService));
            m_changeGroupService.RegisterDefaultSourceSerializer(new PocVCMigrationItemSerializer());
        }
Example #4
0
        /// <summary>
        /// Returns a value indicating whether this instance is equal to the specified <see cref="NntpGroup"/> value.
        /// </summary>
        /// <param name="other">A <see cref="NntpGroup"/> object to compare to this instance.</param>
        /// <returns>true if <paramref name="other" /> has the same value as this instance; otherwise, false.</returns>
        public bool Equals(NntpGroup other)
        {
            if ((object)other == null)
            {
                return(false);
            }

            bool equals =
                Name.Equals(other.Name) &&
                ArticleCount.Equals(other.ArticleCount) &&
                LowWaterMark.Equals(other.LowWaterMark) &&
                HighWaterMark.Equals(other.HighWaterMark) &&
                PostingStatus.Equals(other.PostingStatus) &&
                OtherGroup.Equals(other.OtherGroup);

            if (!equals)
            {
                return(false);
            }

            // need to memoize the enumerables for comparison
            // otherwise they can not be used anymore after this call to equals
            if (!(ArticleNumbers is ICollection <long>))
            {
                ArticleNumbers = ArticleNumbers.ToList();
            }
            if (!(other.ArticleNumbers is ICollection <long>))
            {
                other.ArticleNumbers = other.ArticleNumbers.ToList();
            }

            return(ArticleNumbers.SequenceEqual(other.ArticleNumbers));
        }
Example #5
0
        /// <summary>
        /// Obtain references to services needed by this class
        /// </summary>
        public void InitializeServices(IServiceContainer syncMonitorServiceContainer)
        {
            m_configurationService = (ConfigurationService)syncMonitorServiceContainer.GetService(typeof(ConfigurationService));
            Debug.Assert(m_configurationService != null, "Configuration service is not initialized");

            m_hwmDelta = new HighWaterMark <DateTime>(Constants.HwmDelta);
            m_configurationService.RegisterHighWaterMarkWithSession(m_hwmDelta);
        }
Example #6
0
 public override int GetHashCode()
 {
     unchecked {
         int hashCode = base.GetHashCode();
         hashCode = (hashCode * 397) ^ HighWaterMark.GetHashCode();
         hashCode = (hashCode * 397) ^ (Messages?.GetHashCode() ?? 0);
         return(hashCode);
     }
 }
Example #7
0
        /// <summary>
        /// Initializes the services.
        /// </summary>
        /// <param name="analysisService">The analysis service.</param>
        /// <exception cref="ArgumentNullException">If the analysisServiceContainer parameter is null</exception>
        public override void InitializeServices(IServiceContainer analysisService)
        {
            TraceManager.TraceInformation("WSSWIT:AP:InitializeServices");
            if (analysisService == null)
            {
                throw new ArgumentNullException("analysisService");
            }

            this.analysisServiceContainer = analysisService;
            this.configurationService     = (ConfigurationService)analysisService.GetService(typeof(ConfigurationService));
            MigrationSource migrationSourceConfiguration   = configurationService.MigrationSource;
            SharePointMigrationDataSource dataSourceConfig = InitializeMigrationDataSource();
            string username = string.Empty;
            string password = string.Empty;

            foreach (CustomSetting customSetting in configurationService.MigrationSource.CustomSettings.CustomSetting)
            {
                switch (customSetting.SettingKey)
                {
                case "username":
                {
                    username = customSetting.SettingValue;
                    break;
                }

                case "password":
                {
                    password = customSetting.SettingValue;
                    break;
                }
                }
            }

            dataSourceConfig.Credentials = new System.Net.NetworkCredential(username, password);
            dataSourceConfig.Url         = migrationSourceConfiguration.ServerUrl;
            dataSourceConfig.ListName    = migrationSourceConfiguration.SourceIdentifier;

            this.supportedContentTypes = new Collection <ContentType>();
            this.supportedContentTypes.Add(WellKnownContentType.WorkItem);

            SharePointChangeActionHandlers handler = new SharePointChangeActionHandlers(this);

            this.supportedChangeActions = new Dictionary <Guid, ChangeActionHandler>();
            this.supportedChangeActions.Add(WellKnownChangeActionId.Add, handler.BasicActionHandler);
            this.supportedChangeActions.Add(WellKnownChangeActionId.Edit, handler.BasicActionHandler);
            this.supportedChangeActions.Add(WellKnownChangeActionId.Delete, handler.BasicActionHandler);

            this.highWaterMarkDelta     = new HighWaterMark <DateTime>(Constants.HwmDelta);
            this.highWaterMarkChangeSet = new HighWaterMark <int>("LastChangeSet");
            this.configurationService.RegisterHighWaterMarkWithSession(this.highWaterMarkDelta);
            this.configurationService.RegisterHighWaterMarkWithSession(this.highWaterMarkChangeSet);

            this.changeGroupService = (ChangeGroupService)analysisServiceContainer.GetService(typeof(ChangeGroupService));
            this.changeGroupService.RegisterDefaultSourceSerializer(new SharePointWITMigrationItemSerializer());
        }
Example #8
0
 /// <summary>
 /// This constructor will create a TfsFilesystemAnalysisProvider that
 /// uses the other side sync point as the base changeset to calculate differences.
 /// </summary>
 /// <param name="syncToLastTfsChangeset"></param>
 public TfsFileSystemAnalysisProvider(bool syncToLastTfsChangeset)
 {
     if (syncToLastTfsChangeset)
     {
         m_hwmLastSyncedTfsChangeset = new HighWaterMark <int>(TFSFileSystemAdapterConstants.HwmLastSyncedTfsChangeset);
     }
     else
     {
         m_hwmLastSyncedTfsChangeset = null;
     }
 }
Example #9
0
        /// <summary>
        /// Initialize TfsVCAdapter
        /// </summary>
        public void InitializeServices(IServiceContainer analysisServiceContainer)
        {
            m_analysisServiceContainer = analysisServiceContainer;

            ConfigurationService = (ConfigurationService)m_analysisServiceContainer.GetService(typeof(ConfigurationService));

            m_hwmDelta = new HighWaterMark <int>(Constants.HwmDelta);
            ConfigurationService.RegisterHighWaterMarkWithSession(m_hwmDelta);
            m_changeGroupService = (ChangeGroupService)m_analysisServiceContainer.GetService(typeof(ChangeGroupService));
            m_changeGroupService.RegisterDefaultSourceSerializer(new TfsMigrationItemSerialzier());
        }
 /// <summary>
 /// Initialize method.
 /// </summary>
 public void InitializeServices(IServiceContainer migrationServiceContainer)
 {
     m_migrationServiceContainer = migrationServiceContainer;
     m_changeGroupService        = (ChangeGroupService)m_migrationServiceContainer.GetService(typeof(ChangeGroupService));
     m_changeGroupService.RegisterDefaultSourceSerializer(new TfsFileSystemMigrationItemSerializer());
     Debug.Assert(m_changeGroupService != null, "Change group service is not initialized");
     m_configurationService = (ConfigurationService)m_migrationServiceContainer.GetService(typeof(ConfigurationService));
     Debug.Assert(m_configurationService != null, "Configuration service is not initialized");
     m_eventService             = (EventService)m_migrationServiceContainer.GetService(typeof(EventService));
     m_changeGroupHighWaterMark = new HighWaterMark <long>("LastChangeGroupMigratedHighWaterMark");
     m_configurationService.RegisterHighWaterMarkWithSession(m_changeGroupHighWaterMark);
 }
Example #11
0
        /// <summary>
        /// Initialize method of the analysis provider - acquire references to the services provided by the platform.
        /// </summary>
        /// <param name="analysisServiceContainer"></param>
        public void InitializeServices(IServiceContainer analysisServiceContainer)
        {
            m_analysisServiceContainer = analysisServiceContainer;

            m_configurationService = (ConfigurationService)m_analysisServiceContainer.GetService(typeof(ConfigurationService));
            m_hwmDelta             = new HighWaterMark <DateTime>(Constants.HwmDelta);
            m_configurationService.RegisterHighWaterMarkWithSession(m_hwmDelta);
            m_hwmEventId = new HighWaterMark <long>("HWMCCEventId");
            m_configurationService.RegisterHighWaterMarkWithSession(m_hwmEventId);
            m_changeGroupService = (ChangeGroupService)m_analysisServiceContainer.GetService(typeof(ChangeGroupService));
            m_changeGroupService.RegisterDefaultSourceSerializer(new ClearCaseV6MigrationItemSerialzier());
        }
Example #12
0
        /// <summary>
        /// Initialize method of the analysis provider - acquire references to the services provided by the platform.
        /// </summary>
        /// <param name="analysisServiceContainer"></param>
        public void InitializeServices(IServiceContainer analysisServiceContainer)
        {
            m_analysisServiceContainer = analysisServiceContainer;

            m_configurationService = (ConfigurationService)m_analysisServiceContainer.GetService(typeof(ConfigurationService));
            m_hwmDelta             = new HighWaterMark <DateTime>(Constants.HwmDelta);
            m_configurationService.RegisterHighWaterMarkWithSession(m_hwmDelta);
            m_lastTfsChangesetAnalyzed = new HighWaterMark <int>(TFSFileSystemAdapterConstants.HwmLastTfsChangesetAnalyzed);
            m_configurationService.RegisterHighWaterMarkWithSession(m_lastTfsChangesetAnalyzed);
            m_lastHighWaterMarkMigratedToPeer = new HighWaterMark <int>(Constants.HwmMigrated);
            m_configurationService.RegisterHighWaterMarkWithSession(m_lastHighWaterMarkMigratedToPeer, m_configurationService.MigrationPeer);
            m_changeGroupService = (ChangeGroupService)m_analysisServiceContainer.GetService(typeof(ChangeGroupService));
            m_changeGroupService.RegisterDefaultSourceSerializer(new TfsFileSystemMigrationItemSerializer());
            m_branchConfiguration = new TfsFileSystemConfiguration(m_configurationService);
        }
Example #13
0
 /// <summary>
 /// Returns the hash code for this instance.
 /// </summary>
 /// <returns>A 32-bit signed integer hash code.</returns>
 public override int GetHashCode()
 {
     unchecked
     {
         var hash = 17;
         hash *= 23 + Name.GetHashCode();
         hash *= 23 + ArticleCount.GetHashCode();
         hash *= 23 + LowWaterMark.GetHashCode();
         hash *= 23 + HighWaterMark.GetHashCode();
         hash *= 23 + PostingStatus.GetHashCode();
         hash *= 23 + OtherGroup.GetHashCode();
         hash *= 23 + ArticleNumbers.GetHashCode();
         return(hash);
     }
 }
Example #14
0
 /// <summary>
 /// Returns a value indicating whether this instance is equal to the specified <see cref="NntpGroup"/> value.
 /// </summary>
 /// <param name="other">A <see cref="NntpGroup"/> object to compare to this instance.</param>
 /// <returns>true if <paramref name="other" /> has the same value as this instance; otherwise, false.</returns>
 public bool Equals(NntpGroup other)
 {
     if ((object)other == null)
     {
         return(false);
     }
     return
         (Name.Equals(other.Name) &&
          ArticleCount.Equals(other.ArticleCount) &&
          LowWaterMark.Equals(other.LowWaterMark) &&
          HighWaterMark.Equals(other.HighWaterMark) &&
          PostingStatus.Equals(other.PostingStatus) &&
          OtherGroup.Equals(other.OtherGroup) &&
          MultiSetComparer <int> .Instance.Equals(ArticleNumbers, other.ArticleNumbers));
 }
Example #15
0
        public virtual void Initialize(ServiceContainer serviceContainer)
        {
            Debug.Assert(null != serviceContainer, "ServiceContainer is NULL");
            m_serviceContainer = serviceContainer;

            m_linkTranslationService = serviceContainer.GetService(typeof(ILinkTranslationService)) as ILinkTranslationService;
            Debug.Assert(null != m_linkTranslationService, "ILinkTranslationService has not been properly initialized");

            m_configurationService = serviceContainer.GetService(typeof(ConfigurationService)) as ConfigurationService;
            Debug.Assert(null != m_configurationService, "ConfigurationService has not been properly initialized");

            m_hwmLink = new HighWaterMark <DateTime>(Toolkit.Constants.HwmDeltaLink);
            m_configurationService.RegisterHighWaterMarkWithSession(m_hwmLink);

            InitializeTfsClient();

            RegisterArtifactHandlers();
        }
        public override void PreAnalysis(AnalysisContext analysisContext)
        {
            m_configurationService = analysisContext.TookitServiceContainer.GetService(typeof(ConfigurationService)) as ConfigurationService;

            if (m_configurationService != null)
            {
                // Create a HWM and set the initial value
                m_hwmSemaphoreFile = new HighWaterMark <DateTime>(c_semaphoreFileHWNName);
                m_configurationService.RegisterHighWaterMarkWithSession(m_hwmSemaphoreFile);

                Dictionary <string, string> addinCustomSettings = new Dictionary <string, string>(StringComparer.OrdinalIgnoreCase);
                addinCustomSettings.Add(c_semaphoreFilePath, null);
                addinCustomSettings.Add(c_excludeDateTimeFromLabelName, null);

                AddinCustomSettingsHelper.GetAddinCustomSettings(m_configurationService, ReferenceNameString, addinCustomSettings);
                m_semaphoreFilePath = addinCustomSettings[c_semaphoreFilePath];

                if (string.IsNullOrEmpty(m_semaphoreFilePath))
                {
                    throw new MigrationException(SemaphoreFileAnalysisAddinResources.SemaphoreFilePathNotConfigured);
                }

                if (addinCustomSettings[c_excludeDateTimeFromLabelName] != null &&
                    string.Equals(addinCustomSettings[c_excludeDateTimeFromLabelName], "true", StringComparison.OrdinalIgnoreCase))
                {
                    m_excludeDateTimeFromLabelName = true;
                }
            }
            else
            {
                Debug.Fail("SemaphoreFileAnalysisAddin unable to get ConfigurationService");
                throw new ArgumentNullException("ConfigurationService");
            }

            m_vcTranslationService = analysisContext.TookitServiceContainer.GetService(typeof(ITranslationService)) as VCTranslationService;

            m_sourceId = new Guid(m_configurationService.MigrationSource.InternalUniqueId);
        }
Example #17
0
        /// <summary>
        /// Initialize method.
        /// </summary>
        public void InitializeServices(IServiceContainer migrationServiceContainer)
        {
            m_migrationServiceContainer = migrationServiceContainer;
            m_changeGroupService        = (ChangeGroupService)m_migrationServiceContainer.GetService(typeof(ChangeGroupService));
            if (m_alternativeSerializer == null)
            {
                m_changeGroupService.RegisterDefaultSourceSerializer(new ClearCaseV6MigrationItemSerialzier());
            }
            else
            {
                m_changeGroupService.RegisterDefaultSourceSerializer(m_alternativeSerializer);
            }
            Debug.Assert(m_changeGroupService != null, "Change group service is not initialized");
            m_configurationService = (ConfigurationService)m_migrationServiceContainer.GetService(typeof(ConfigurationService));
            Debug.Assert(m_configurationService != null, "Configuration service is not initialized");
            m_eventService             = (EventService)m_migrationServiceContainer.GetService(typeof(EventService));
            m_commentDecorationService = (ICommentDecorationService)m_migrationServiceContainer.GetService(typeof(ICommentDecorationService));
            Debug.Assert(m_commentDecorationService != null, "Comment decoration service is not initialized");
            m_changeGroupHighWaterMark = new HighWaterMark <long>("LastChangeGroupMigratedHighWaterMark");
            m_configurationService.RegisterHighWaterMarkWithSession(m_changeGroupHighWaterMark);
            if (m_hwmLastSyncedTfsChangeset != null)
            {
                m_configurationService.RegisterHighWaterMarkWithSession(m_hwmLastSyncedTfsChangeset);
            }

            foreach (BusinessModel.VC.Setting setting in m_configurationService.VcCustomSetting.Settings.Setting)
            {
                if (string.Equals(
                        setting.SettingKey, MigrationToolkitResources.VCSetting_DisableTargetAnalysis, StringComparison.OrdinalIgnoreCase))
                {
                    if (string.Equals(setting.SettingValue, "True", StringComparison.OrdinalIgnoreCase))
                    {
                        m_overrideTargetChange = true;
                        break;
                    }
                }
            }
        }
Example #18
0
        public void Initialize(ServiceContainer serviceContainer)
        {
            Debug.Assert(null != serviceContainer, "ServiceContainer is NULL");

            m_serviceContainer = serviceContainer;

            m_linkTranslationService = serviceContainer.GetService(typeof(ILinkTranslationService)) as ILinkTranslationService;
            Debug.Assert(null != m_linkTranslationService, "ILinkTranslationService has not been properly initialized");

            m_configurationService = serviceContainer.GetService(typeof(ConfigurationService)) as ConfigurationService;
            Debug.Assert(null != m_configurationService, "ConfigurationService has not been properly initialized");

            m_hwmLink = new HighWaterMark <DateTime>(ClearQuestConstants.CqLinkHwm);
            m_configurationService.RegisterHighWaterMarkWithSession(m_hwmLink);

            m_linkConfigLookupService = m_linkTranslationService.LinkConfigurationLookupService;

            m_conflictManager = serviceContainer.GetService(typeof(ConflictManager)) as ConflictManager;

            InitializeClient();

            RegisterArtifactHandlers();

            MigrationSource migrSrcConfig = m_configurationService.MigrationSource;

            Debug.Assert(null != migrSrcConfig, "cannot get MigrationSource config from Session");
            foreach (CustomSetting setting in migrSrcConfig.CustomSettings.CustomSetting)
            {
                if (setting.SettingKey.Equals(ClearQuestConstants.CqWebRecordUrlBaseSettingKey, StringComparison.OrdinalIgnoreCase))
                {
                    string urlFormat           = setting.SettingValue;
                    var    recordHyperLinkType = new ClearQuestWebRecordLinkType(urlFormat);
                    m_supportedLinkTypes.Add(recordHyperLinkType.ReferenceName, recordHyperLinkType);
                    ExtractLinkChangeActionsCallback += ((ILinkHandler)recordHyperLinkType).ExtractLinkChangeActions;
                    break;
                }
            }
        }
        protected override void SubmitLinkChangesWithUpdateDoc(
            LinkChangeGroup linkChanges,
            ServiceContainer serviceContainer,
            TfsLinkingProviderBase.LinkSubmissionPhase submissionPhase)
        {
            ConfigurationService configService      = serviceContainer.GetService(typeof(ConfigurationService)) as ConfigurationService;
            ITranslationService  translationService = serviceContainer.GetService(typeof(ITranslationService)) as ITranslationService;

            if (m_hwmSubmittedLinkChangeId == null)
            {
                m_hwmSubmittedLinkChangeId = new HighWaterMark <long>(TfsConstants.HwmSubmittedLinkChangeId);
                configService.RegisterHighWaterMarkWithSession(m_hwmSubmittedLinkChangeId);
            }

            bool nonWorkItemLinkChangesAllSubmitted = SubmitNonWorkItemLinkChanges(
                linkChanges, serviceContainer, configService, translationService, submissionPhase);
            bool workItemLinkChangesAllSubmitted = SubmitWorkItemLinkChanges(
                linkChanges, serviceContainer, configService, translationService, submissionPhase);

            linkChanges.Status = (nonWorkItemLinkChangesAllSubmitted && workItemLinkChangesAllSubmitted && AllActionSubmitted(linkChanges))
                                     ? LinkChangeGroup.LinkChangeGroupStatus.Completed
                                     : LinkChangeGroup.LinkChangeGroupStatus.ReadyForMigration;
        }
Example #20
0
        /// <summary>
        /// Initialize the adapter services
        /// </summary>
        /// <param name="analysisServiceContainer"></param>
        public void InitializeServices(IServiceContainer analysisServiceContainer)
        {
            m_analysisServiceContainer = analysisServiceContainer;

            m_changeGroupService = (ChangeGroupService)m_analysisServiceContainer.GetService(typeof(ChangeGroupService));
            Debug.Assert(m_changeGroupService != null, "Change group service is not initialized");

            m_changeGroupService.RegisterDefaultSourceSerializer(new ClearQuestRecordItemSerializer());
            //m_changeGroupService.RegisterSourceSerializer(
            //    WellKnownChangeActionId.SyncContext, new WorkItemContextSyncMigrationItemSerializer());
            m_changeGroupService.RegisterSourceSerializer(
                WellKnownChangeActionId.AddAttachment, new ClearQuestAttachmentItemSerializer());
            m_changeGroupService.RegisterSourceSerializer(
                WellKnownChangeActionId.DelAttachment, new ClearQuestAttachmentItemSerializer());

            m_configurationService = (ConfigurationService)m_analysisServiceContainer.GetService(typeof(ConfigurationService));
            Debug.Assert(m_configurationService != null, "Configuration service is not initialized");

            m_conflictManagerService = m_analysisServiceContainer.GetService(typeof(ConflictManager)) as ConflictManager;

            m_hwmDelta = new HighWaterMark <DateTime>(ClearQuestConstants.CqRecordHwm);
            m_configurationService.RegisterHighWaterMarkWithSession(m_hwmDelta);
        }
        /// <summary>
        /// Initialize the adapter services
        /// </summary>
        /// <param name="analysisServiceContainer"></param>
        public virtual void InitializeServices(IServiceContainer analysisServiceContainer)
        {
            m_analysisServiceContainer = analysisServiceContainer;

            m_changeGroupService = (ChangeGroupService)m_analysisServiceContainer.GetService(typeof(ChangeGroupService));
            Debug.Assert(m_changeGroupService != null, "Change group service is not initialized");

            m_changeGroupService.RegisterDefaultSourceSerializer(new MigrationItemSerializer <TfsWITMigrationItem>());
            m_changeGroupService.RegisterSourceSerializer(
                WellKnownChangeActionId.SyncContext, new MigrationItemSerializer <WorkItemContextSyncMigrationItem>());
            m_changeGroupService.RegisterSourceSerializer(
                WellKnownChangeActionId.AddAttachment, new MigrationItemSerializer <TfsMigrationFileAttachment>());
            m_changeGroupService.RegisterSourceSerializer(
                WellKnownChangeActionId.DelAttachment, new MigrationItemSerializer <TfsMigrationFileAttachment>());

            m_configurationService = (ConfigurationService)m_analysisServiceContainer.GetService(typeof(ConfigurationService));
            Debug.Assert(m_configurationService != null, "Configuration service is not initialized");

            m_hwmDelta = new HighWaterMark <DateTime>(Toolkit.Constants.HwmDeltaWit);
            m_configurationService.RegisterHighWaterMarkWithSession(m_hwmDelta);

            m_hwmCSSMaxSeqId = new HighWaterMark <int>("HwmTfsCommonStructureNodeChanges");
            m_configurationService.RegisterHighWaterMarkWithSession(m_hwmCSSMaxSeqId);
        }
Example #22
0
 /// <summary>
 /// Constructor.
 /// Initialize a clearCaseV6MigrationProvider with an alternative serializer.
 /// This is used for ClearTFSAdapter
 /// </summary>
 /// <param name="alternativeSerializer"></param>
 public ClearCaseMigrationProvider(IMigrationItemSerializer alternativeSerializer, string hwmName)
 {
     m_alternativeSerializer     = alternativeSerializer;
     m_hwmLastSyncedTfsChangeset = new HighWaterMark <int>(hwmName);
 }
Example #23
0
 public TfsFileSystemAnalysisProvider()
 {
     m_hwmLastSyncedTfsChangeset = null;
 }
Example #24
0
 public ClearCaseMigrationProvider()
 {
     m_alternativeSerializer     = null;
     m_hwmLastSyncedTfsChangeset = null;
 }