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


C# Generated.getBl方法代码示例

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


在下文中一共展示了Generated.getBl方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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.Paragraph obj, bool visitSubNodes)
        {
            if ( obj.getId() != null )
              {
            obj.setId(obj.getId().Trim());
              }
              if ( obj.getBl() != null )
              {
            obj.setBl(obj.getBl().Trim());
              }
              if ( obj.getText() != null )
              {
            obj.setText(obj.getText().Trim());
              }
              if ( obj.getVersion() != null )
              {
            obj.setVersion(obj.getVersion().Trim());
              }
              if ( obj.getObsoleteFunctionalBlockName() != null )
              {
            obj.setObsoleteFunctionalBlockName(obj.getObsoleteFunctionalBlockName().Trim());
              }
              if ( obj.getObsoleteGuid() != null )
              {
            obj.setObsoleteGuid(obj.getObsoleteGuid().Trim());
              }

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

示例2: compareParagraph

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

            compareReferencesParagraph (obj, other, diff);

            if ( !CompareUtil.canonicalStringEquality(obj.getId(), other.getId()) )
            {
                diff.appendChanges ( new Diff(obj, HistoricalData.Generated.acceptor.ChangeOperationEnum.aChange, "Id", other.getId(), obj.getId()) );
            }
            if ( obj.getType() != other.getType() )
            {
                diff.appendChanges ( new Diff(obj, HistoricalData.Generated.acceptor.ChangeOperationEnum.aChange, "Type", other.getType().ToString(), obj.getType().ToString()) );
            }
            if ( !CompareUtil.canonicalStringEquality(obj.getBl(), other.getBl()) )
            {
                diff.appendChanges ( new Diff(obj, HistoricalData.Generated.acceptor.ChangeOperationEnum.aChange, "Bl", other.getBl(), obj.getBl()) );
            }
            if ( obj.getOptional() != other.getOptional() )
            {
                diff.appendChanges ( new Diff(obj, HistoricalData.Generated.acceptor.ChangeOperationEnum.aChange, "Optional", other.getOptional().ToString(), obj.getOptional().ToString()) );
            }
            if ( !CompareUtil.canonicalStringEquality(obj.getText(), other.getText()) )
            {
                diff.appendChanges ( new Diff(obj, HistoricalData.Generated.acceptor.ChangeOperationEnum.aChange, "Text", other.getText(), obj.getText()) );
            }
            if ( !CompareUtil.canonicalStringEquality(obj.getVersion(), other.getVersion()) )
            {
                diff.appendChanges ( new Diff(obj, HistoricalData.Generated.acceptor.ChangeOperationEnum.aChange, "Version", other.getVersion(), obj.getVersion()) );
            }
            if ( obj.getReviewed() != other.getReviewed() )
            {
                diff.appendChanges ( new Diff(obj, HistoricalData.Generated.acceptor.ChangeOperationEnum.aChange, "Reviewed", other.getReviewed().ToString(), obj.getReviewed().ToString()) );
            }
            if ( obj.getImplementationStatus() != other.getImplementationStatus() )
            {
                diff.appendChanges ( new Diff(obj, HistoricalData.Generated.acceptor.ChangeOperationEnum.aChange, "ImplementationStatus", other.getImplementationStatus().ToString(), obj.getImplementationStatus().ToString()) );
            }
            if ( obj.allParagraphs() != null )
            {
                if ( other.allParagraphs() != null )
                {
                    foreach ( Generated.Paragraph subElement in obj.allParagraphs() )
                    {
                        bool compared = false;
                        foreach ( Generated.Paragraph otherElement in other.allParagraphs() )
                        {
                            if ( subElement.Guid == otherElement.Guid )
                            {
                                compareParagraph ( subElement, otherElement, diff );
                                compared = true;
                            break;
                            }
                        }

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

                    foreach ( Generated.Paragraph otherElement in other.allParagraphs() )
                    {
                        bool found = false;
                        foreach ( Generated.Paragraph subElement in obj.allParagraphs() )
                        {
                            if ( subElement.Guid == otherElement.Guid )
                            {
                                found = true;
                                break;
                            }
                        }

                        if ( !found )
                        {
                            diff.appendChanges ( new Diff(obj, HistoricalData.Generated.acceptor.ChangeOperationEnum.aRemove , "Paragraphs", otherElement.Name) );
                        }
                    }
                }
                else
                {
                    foreach ( Generated.Paragraph subElement in obj.allParagraphs() )
                    {
                        diff.appendChanges ( new Diff(subElement, HistoricalData.Generated.acceptor.ChangeOperationEnum.aAdd, "Paragraphs", "", subElement.Name ) );
                    }
                }
            }
            else
            {
                if ( other.allParagraphs() != null )
                {
//.........这里部分代码省略.........
开发者ID:nikiforovandrey,项目名称:ERTMSFormalSpecs,代码行数:101,代码来源:Comparer.cs

示例3: DuplicateParagraph

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

                target.setId(source.getId());
                target.setType(source.getType());
                target.setBl(source.getBl());
                target.setOptional(source.getOptional());
                target.setText(source.getText());
                target.setVersion(source.getVersion());
                target.setReviewed(source.getReviewed());
                target.setImplementationStatus(source.getImplementationStatus());
                target.setMoreInfoRequired(source.getMoreInfoRequired());
                target.setSpecIssue(source.getSpecIssue());
                target.setTested(source.getTested());
            }
        }
开发者ID:nikiforovandrey,项目名称:ERTMSFormalSpecs,代码行数:24,代码来源:Comparer.cs

示例4: searchParagraph

        /// <summary>
        /// Searches a specific string in Paragraph 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 searchParagraph(Generated.Paragraph obj, string searchString, List<ModelElement> occurences)
        {
            searchReferencesParagraph (obj, searchString, occurences);

            if ( obj.getId() != null && obj.getId().Contains (searchString) )
            {
                occurences.Add ( obj );
            }
            if ( obj.getBl() != null && obj.getBl().Contains (searchString) )
            {
                occurences.Add ( obj );
            }
            if ( obj.getText() != null && obj.getText().Contains (searchString) )
            {
                occurences.Add ( obj );
            }
            if ( obj.getVersion() != null && obj.getVersion().Contains (searchString) )
            {
                occurences.Add ( obj );
            }
            if ( obj.allParagraphs() != null )
            {
                foreach ( Generated.Paragraph subElement in obj.allParagraphs() )
                {
                    searchParagraph ( subElement, searchString, occurences );
                }
            }
            if ( obj.getRevision() != null )
            {
                searchParagraphRevision ( obj.getRevision(), searchString, occurences );
            }
            if ( obj.getObsoleteFunctionalBlockName() != null && obj.getObsoleteFunctionalBlockName().Contains (searchString) )
            {
                occurences.Add ( obj );
            }
            if ( obj.allRequirementSets() != null )
            {
                foreach ( Generated.RequirementSetReference subElement in obj.allRequirementSets() )
                {
                    searchRequirementSetReference ( subElement, searchString, occurences );
                }
            }
            if ( obj.getObsoleteGuid() != null && obj.getObsoleteGuid().Contains (searchString) )
            {
                occurences.Add ( obj );
            }
        }
开发者ID:nikiforovandrey,项目名称:ERTMSFormalSpecs,代码行数:54,代码来源:Comparer.cs


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