当前位置: 首页>>代码示例>>C#>>正文


C# Generated.getObsoleteComment方法代码示例

本文整理汇总了C#中Generated.getObsoleteComment方法的典型用法代码示例。如果您正苦于以下问题:C# Generated.getObsoleteComment方法的具体用法?C# Generated.getObsoleteComment怎么用?C# Generated.getObsoleteComment使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Generated的用法示例。


在下文中一共展示了Generated.getObsoleteComment方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: visit

        /// <summary>
        /// Cleans all text fields in this element
        /// </summary>
        /// <param name="obj"></param>
        /// <param name="visitSubNodes"></param>
        public override void visit(Generated.Step obj, bool visitSubNodes)
        {
            if ( obj.getDescription() != null )
              {
            obj.setDescription(obj.getDescription().Trim());
              }
              if ( obj.getObsoleteComment() != null )
              {
            obj.setObsoleteComment(obj.getObsoleteComment().Trim());
              }
              if ( obj.getUserComment() != null )
              {
            obj.setUserComment(obj.getUserComment().Trim());
              }

              base.visit(obj, visitSubNodes);
        }
开发者ID:nikiforovandrey,项目名称:ERTMSFormalSpecs,代码行数:22,代码来源:Cleaner.cs

示例2: DuplicateStep

        /// <summary>
        /// Duplicates a source Step into its target
        /// </summary>
        /// <param name="source"></param>
        /// <param name="target"></param>
        public static void DuplicateStep(Generated.Step source, Generated.Step target)
        {
            if ( source != null && target != null )
            {
                DuplicateReferencesParagraph (source, target);

                target.setTCS_Order(source.getTCS_Order());
                target.setDistance(source.getDistance());
                target.setDescription(source.getDescription());
                target.setObsoleteComment(source.getObsoleteComment());
                target.setUserComment(source.getUserComment());
                target.setIO(source.getIO());
                target.setInterface(source.getInterface());
                target.setLevelIN(source.getLevelIN());
                target.setLevelOUT(source.getLevelOUT());
                target.setModeIN(source.getModeIN());
                target.setModeOUT(source.getModeOUT());
                target.setTranslationRequired(source.getTranslationRequired());
                target.setTranslated(source.getTranslated());
            }
        }
开发者ID:nikiforovandrey,项目名称:ERTMSFormalSpecs,代码行数:26,代码来源:Comparer.cs

示例3: compareStep

        /// <summary>
        /// Compares two Step and annotates the differences on the first one
        /// </summary>
        /// <param name="obj"></param>
        /// <param name="other"></param>
        public static void compareStep(Generated.Step obj, Generated.Step other, VersionDiff diff)
        {
            if ( other == null )
            {
                diff.appendChanges ( new Diff(obj, HistoricalData.Generated.acceptor.ChangeOperationEnum.aAdd, "", "", obj.Name ) );
                return;
            }

            compareReferencesParagraph (obj, other, diff);

            if ( obj.getTCS_Order() != other.getTCS_Order() )
            {
                diff.appendChanges ( new Diff(obj, HistoricalData.Generated.acceptor.ChangeOperationEnum.aChange, "TCS_Order", other.getTCS_Order().ToString(), obj.getTCS_Order().ToString()) );
            }
            if ( obj.getDistance() != other.getDistance() )
            {
                diff.appendChanges ( new Diff(obj, HistoricalData.Generated.acceptor.ChangeOperationEnum.aChange, "Distance", other.getDistance().ToString(), obj.getDistance().ToString()) );
            }
            if ( !CompareUtil.canonicalStringEquality(obj.getDescription(), other.getDescription()) )
            {
                diff.appendChanges ( new Diff(obj, HistoricalData.Generated.acceptor.ChangeOperationEnum.aChange, "Description", other.getDescription(), obj.getDescription()) );
            }
            if ( !CompareUtil.canonicalStringEquality(obj.getObsoleteComment(), other.getObsoleteComment()) )
            {
                diff.appendChanges ( new Diff(obj, HistoricalData.Generated.acceptor.ChangeOperationEnum.aChange, "ObsoleteComment", other.getObsoleteComment(), obj.getObsoleteComment()) );
            }
            if ( !CompareUtil.canonicalStringEquality(obj.getUserComment(), other.getUserComment()) )
            {
                diff.appendChanges ( new Diff(obj, HistoricalData.Generated.acceptor.ChangeOperationEnum.aChange, "UserComment", other.getUserComment(), obj.getUserComment()) );
            }
            if ( obj.getIO() != other.getIO() )
            {
                diff.appendChanges ( new Diff(obj, HistoricalData.Generated.acceptor.ChangeOperationEnum.aChange, "IO", other.getIO().ToString(), obj.getIO().ToString()) );
            }
            if ( obj.getInterface() != other.getInterface() )
            {
                diff.appendChanges ( new Diff(obj, HistoricalData.Generated.acceptor.ChangeOperationEnum.aChange, "Interface", other.getInterface().ToString(), obj.getInterface().ToString()) );
            }
            if ( obj.getLevelIN() != other.getLevelIN() )
            {
                diff.appendChanges ( new Diff(obj, HistoricalData.Generated.acceptor.ChangeOperationEnum.aChange, "LevelIN", other.getLevelIN().ToString(), obj.getLevelIN().ToString()) );
            }
            if ( obj.getLevelOUT() != other.getLevelOUT() )
            {
                diff.appendChanges ( new Diff(obj, HistoricalData.Generated.acceptor.ChangeOperationEnum.aChange, "LevelOUT", other.getLevelOUT().ToString(), obj.getLevelOUT().ToString()) );
            }
            if ( obj.getModeIN() != other.getModeIN() )
            {
                diff.appendChanges ( new Diff(obj, HistoricalData.Generated.acceptor.ChangeOperationEnum.aChange, "ModeIN", other.getModeIN().ToString(), obj.getModeIN().ToString()) );
            }
            if ( obj.getModeOUT() != other.getModeOUT() )
            {
                diff.appendChanges ( new Diff(obj, HistoricalData.Generated.acceptor.ChangeOperationEnum.aChange, "ModeOUT", other.getModeOUT().ToString(), obj.getModeOUT().ToString()) );
            }
            if ( obj.getTranslationRequired() != other.getTranslationRequired() )
            {
                diff.appendChanges ( new Diff(obj, HistoricalData.Generated.acceptor.ChangeOperationEnum.aChange, "TranslationRequired", other.getTranslationRequired().ToString(), obj.getTranslationRequired().ToString()) );
            }
            if ( obj.getTranslated() != other.getTranslated() )
            {
                diff.appendChanges ( new Diff(obj, HistoricalData.Generated.acceptor.ChangeOperationEnum.aChange, "Translated", other.getTranslated().ToString(), obj.getTranslated().ToString()) );
            }
            if ( obj.allSubSteps() != null )
            {
                if ( other.allSubSteps() != null )
                {
                    foreach ( Generated.SubStep subElement in obj.allSubSteps() )
                    {
                        bool compared = false;
                        foreach ( Generated.SubStep otherElement in other.allSubSteps() )
                        {
                            if ( subElement.Guid == otherElement.Guid )
                            {
                                compareSubStep ( subElement, otherElement, diff );
                                compared = true;
                            break;
                            }
                        }

                        if ( !compared )
                        {
                            diff.appendChanges ( new Diff(subElement, HistoricalData.Generated.acceptor.ChangeOperationEnum.aAdd, "SubSteps", "", subElement.Name ) );
                        }
                    }

                    foreach ( Generated.SubStep otherElement in other.allSubSteps() )
                    {
                        bool found = false;
                        foreach ( Generated.SubStep subElement in obj.allSubSteps() )
                        {
                            if ( subElement.Guid == otherElement.Guid )
                            {
                                found = true;
                                break;
                            }
//.........这里部分代码省略.........
开发者ID:nikiforovandrey,项目名称:ERTMSFormalSpecs,代码行数:101,代码来源:Comparer.cs

示例4: searchTranslation

        /// <summary>
        /// Searches a specific string in Translation and updates the list 
        /// of model element with all the elements in which that string is found
        /// </summary>
        /// <param name="obj"></param>
        /// <param name="obj">The string to search for</param>
        /// <param name="occurences">The list of model elements which hold the searched string</param>
        public static void searchTranslation(Generated.Translation obj, string searchString, List<ModelElement> occurences)
        {
            searchReferencesParagraph (obj, searchString, occurences);

            if ( obj.allSourceTexts() != null )
            {
                foreach ( Generated.SourceText subElement in obj.allSourceTexts() )
                {
                    searchSourceText ( subElement, searchString, occurences );
                }
            }
            if ( obj.getObsoleteComment() != null && obj.getObsoleteComment().Contains (searchString) )
            {
                occurences.Add ( obj );
            }
            if ( obj.allSubSteps() != null )
            {
                foreach ( Generated.SubStep subElement in obj.allSubSteps() )
                {
                    searchSubStep ( subElement, searchString, occurences );
                }
            }
        }
开发者ID:nikiforovandrey,项目名称:ERTMSFormalSpecs,代码行数:30,代码来源:Comparer.cs

示例5: searchTestCase

        /// <summary>
        /// Searches a specific string in TestCase and updates the list 
        /// of model element with all the elements in which that string is found
        /// </summary>
        /// <param name="obj"></param>
        /// <param name="obj">The string to search for</param>
        /// <param name="occurences">The list of model elements which hold the searched string</param>
        public static void searchTestCase(Generated.TestCase obj, string searchString, List<ModelElement> occurences)
        {
            searchReqRelated (obj, searchString, occurences);

            if ( obj.allSteps() != null )
            {
                foreach ( Generated.Step subElement in obj.allSteps() )
                {
                    searchStep ( subElement, searchString, occurences );
                }
            }
            if ( obj.getObsoleteComment() != null && obj.getObsoleteComment().Contains (searchString) )
            {
                occurences.Add ( obj );
            }
        }
开发者ID:nikiforovandrey,项目名称:ERTMSFormalSpecs,代码行数:23,代码来源:Comparer.cs

示例6: searchStep

        /// <summary>
        /// Searches a specific string in Step and updates the list 
        /// of model element with all the elements in which that string is found
        /// </summary>
        /// <param name="obj"></param>
        /// <param name="obj">The string to search for</param>
        /// <param name="occurences">The list of model elements which hold the searched string</param>
        public static void searchStep(Generated.Step obj, string searchString, List<ModelElement> occurences)
        {
            searchReferencesParagraph (obj, searchString, occurences);

            if ( obj.getDescription() != null && obj.getDescription().Contains (searchString) )
            {
                occurences.Add ( obj );
            }
            if ( obj.getObsoleteComment() != null && obj.getObsoleteComment().Contains (searchString) )
            {
                occurences.Add ( obj );
            }
            if ( obj.getUserComment() != null && obj.getUserComment().Contains (searchString) )
            {
                occurences.Add ( obj );
            }
            if ( obj.allSubSteps() != null )
            {
                foreach ( Generated.SubStep subElement in obj.allSubSteps() )
                {
                    searchSubStep ( subElement, searchString, occurences );
                }
            }
            if ( obj.allMessages() != null )
            {
                foreach ( Generated.DBMessage subElement in obj.allMessages() )
                {
                    searchDBMessage ( subElement, searchString, occurences );
                }
            }
        }
开发者ID:nikiforovandrey,项目名称:ERTMSFormalSpecs,代码行数:38,代码来源:Comparer.cs


注:本文中的Generated.getObsoleteComment方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。