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


C# Generated.allRequirementSets方法代码示例

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


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

示例1: ensureGuidParagraph


//.........这里部分代码省略.........
                        {
                            if ( CompareUtil.canonicalStringEquality(subElement.getId(), otherElement.getId()) )
                            {
                                found = true;
                                break;
                            }
                        }

                        if ( !found )
                        {
                            ensureGuidParagraph ( null, otherElement );
                        }
                    }
                }
                else
                {
                    foreach ( Generated.Paragraph subElement in obj.allParagraphs() )
                    {
                        ensureGuidParagraph ( subElement, null );
                    }
                }
            }
            else
            {
                if ( other.allParagraphs() != null )
                {
                    foreach ( Generated.Paragraph otherElement in other.allParagraphs() )
                    {
                        ensureGuidParagraph ( null, otherElement );
                    }
                }
            }
            ensureGuidParagraphRevision ( obj.getRevision(), other.getRevision() );
            if ( obj.allRequirementSets() != null )
            {
                if ( other.allRequirementSets() != null )
                {
                    foreach ( Generated.RequirementSetReference subElement in obj.allRequirementSets() )
                    {
                        bool found = false;

                        // Try first to assign Guid to elements which do not have a guid
                        // This helps handling duplicated in lists
                        foreach ( Generated.RequirementSetReference otherElement in other.allRequirementSets() )
                        {
                            if ( CompareUtil.canonicalStringEquality(subElement.Name, otherElement.Name) && otherElement.getGuid() == null )
                            {
                                ensureGuidRequirementSetReference ( subElement, otherElement );
                                found = true;
                                break;
                            }
                        }

                        if ( !found )
                        {
                            foreach ( Generated.RequirementSetReference otherElement in other.allRequirementSets() )
                            {
                                if ( CompareUtil.canonicalStringEquality(subElement.Name, otherElement.Name) )
                                {
                                    ensureGuidRequirementSetReference ( subElement, otherElement );
                                    found = true;
                                    break;
                                }
                            }
                        }
开发者ID:nikiforovandrey,项目名称:ERTMSFormalSpecs,代码行数:66,代码来源:Comparer.cs

示例2: ensureGuidDictionary


//.........这里部分代码省略.........
                        foreach ( Generated.Specification subElement in obj.allSpecifications() )
                        {
                            if ( CompareUtil.canonicalStringEquality(subElement.Name, otherElement.Name) )
                            {
                                found = true;
                                break;
                            }
                        }

                        if ( !found )
                        {
                            ensureGuidSpecification ( null, otherElement );
                        }
                    }
                }
                else
                {
                    foreach ( Generated.Specification subElement in obj.allSpecifications() )
                    {
                        ensureGuidSpecification ( subElement, null );
                    }
                }
            }
            else
            {
                if ( other.allSpecifications() != null )
                {
                    foreach ( Generated.Specification otherElement in other.allSpecifications() )
                    {
                        ensureGuidSpecification ( null, otherElement );
                    }
                }
            }
            if ( obj.allRequirementSets() != null )
            {
                if ( other.allRequirementSets() != null )
                {
                    foreach ( Generated.RequirementSet subElement in obj.allRequirementSets() )
                    {
                        bool found = false;

                        // Try first to assign Guid to elements which do not have a guid
                        // This helps handling duplicated in lists
                        foreach ( Generated.RequirementSet otherElement in other.allRequirementSets() )
                        {
                            if ( CompareUtil.canonicalStringEquality(subElement.Name, otherElement.Name) && otherElement.getGuid() == null )
                            {
                                ensureGuidRequirementSet ( subElement, otherElement );
                                found = true;
                                break;
                            }
                        }

                        if ( !found )
                        {
                            foreach ( Generated.RequirementSet otherElement in other.allRequirementSets() )
                            {
                                if ( CompareUtil.canonicalStringEquality(subElement.Name, otherElement.Name) )
                                {
                                    ensureGuidRequirementSet ( subElement, otherElement );
                                    found = true;
                                    break;
                                }
                            }
                        }
开发者ID:nikiforovandrey,项目名称:ERTMSFormalSpecs,代码行数:66,代码来源:Comparer.cs

示例3: compareDictionary

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

            if ( obj.allSpecifications() != null )
            {
                if ( other.allSpecifications() != null )
                {
                    foreach ( Generated.Specification subElement in obj.allSpecifications() )
                    {
                        bool compared = false;
                        foreach ( Generated.Specification otherElement in other.allSpecifications() )
                        {
                            if ( subElement.Guid == otherElement.Guid )
                            {
                                compareSpecification ( subElement, otherElement, diff );
                                compared = true;
                            break;
                            }
                        }

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

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

                        if ( !found )
                        {
                            diff.appendChanges ( new Diff(obj, HistoricalData.Generated.acceptor.ChangeOperationEnum.aRemove , "Specifications", otherElement.Name) );
                        }
                    }
                }
                else
                {
                    foreach ( Generated.Specification subElement in obj.allSpecifications() )
                    {
                        diff.appendChanges ( new Diff(subElement, HistoricalData.Generated.acceptor.ChangeOperationEnum.aAdd, "Specifications", "", subElement.Name ) );
                    }
                }
            }
            else
            {
                if ( other.allSpecifications() != null )
                {
                    foreach ( Generated.Specification otherElement in other.allSpecifications() )
                    {
                        diff.appendChanges ( new Diff(obj, HistoricalData.Generated.acceptor.ChangeOperationEnum.aRemove , "Specifications", otherElement.Name) );
                    }
                }
            }
            if ( obj.allRequirementSets() != null )
            {
                if ( other.allRequirementSets() != null )
                {
                    foreach ( Generated.RequirementSet subElement in obj.allRequirementSets() )
                    {
                        bool compared = false;
                        foreach ( Generated.RequirementSet otherElement in other.allRequirementSets() )
                        {
                            if ( subElement.Guid == otherElement.Guid )
                            {
                                compareRequirementSet ( subElement, otherElement, diff );
                                compared = true;
                            break;
                            }
                        }

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

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

示例4: compareParagraph


//.........这里部分代码省略.........
                {
                    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 )
                {
                    foreach ( Generated.Paragraph otherElement in other.allParagraphs() )
                    {
                        diff.appendChanges ( new Diff(obj, HistoricalData.Generated.acceptor.ChangeOperationEnum.aRemove , "Paragraphs", otherElement.Name) );
                    }
                }
            }
            if ( obj.getRevision() == null )
            {
                if ( other.getRevision() != null )
                {
                    diff.appendChanges ( new Diff(obj, HistoricalData.Generated.acceptor.ChangeOperationEnum.aChange, "Revision", "" ) );
                }
            }
            else
            {
                compareParagraphRevision ( obj.getRevision(), other.getRevision(), diff );
            }
            if ( obj.getMoreInfoRequired() != other.getMoreInfoRequired() )
            {
                diff.appendChanges ( new Diff(obj, HistoricalData.Generated.acceptor.ChangeOperationEnum.aChange, "MoreInfoRequired", other.getMoreInfoRequired().ToString(), obj.getMoreInfoRequired().ToString()) );
            }
            if ( obj.getSpecIssue() != other.getSpecIssue() )
            {
                diff.appendChanges ( new Diff(obj, HistoricalData.Generated.acceptor.ChangeOperationEnum.aChange, "SpecIssue", other.getSpecIssue().ToString(), obj.getSpecIssue().ToString()) );
            }
            if ( obj.allRequirementSets() != null )
            {
                if ( other.allRequirementSets() != null )
                {
                    foreach ( Generated.RequirementSetReference subElement in obj.allRequirementSets() )
                    {
                        bool compared = false;
                        foreach ( Generated.RequirementSetReference otherElement in other.allRequirementSets() )
                        {
                            if ( subElement.Guid == otherElement.Guid )
                            {
                                compareRequirementSetReference ( subElement, otherElement, diff );
                                compared = true;
                            break;
                            }
                        }

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

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

                        if ( !found )
                        {
                            diff.appendChanges ( new Diff(obj, HistoricalData.Generated.acceptor.ChangeOperationEnum.aRemove , "RequirementSets", otherElement.Name) );
                        }
                    }
                }
                else
                {
                    foreach ( Generated.RequirementSetReference subElement in obj.allRequirementSets() )
                    {
                        diff.appendChanges ( new Diff(subElement, HistoricalData.Generated.acceptor.ChangeOperationEnum.aAdd, "RequirementSets", "", subElement.Name ) );
                    }
                }
            }
            else
            {
                if ( other.allRequirementSets() != null )
                {
                    foreach ( Generated.RequirementSetReference otherElement in other.allRequirementSets() )
                    {
                        diff.appendChanges ( new Diff(obj, HistoricalData.Generated.acceptor.ChangeOperationEnum.aRemove , "RequirementSets", otherElement.Name) );
                    }
                }
            }
            if ( obj.getTested() != other.getTested() )
            {
                diff.appendChanges ( new Diff(obj, HistoricalData.Generated.acceptor.ChangeOperationEnum.aChange, "Tested", other.getTested().ToString(), obj.getTested().ToString()) );
            }
        }
开发者ID:nikiforovandrey,项目名称:ERTMSFormalSpecs,代码行数:101,代码来源:Comparer.cs

示例5: 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

示例6: searchDictionary

 /// <summary>
 /// Searches a specific string in Dictionary 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 searchDictionary(Generated.Dictionary obj, string searchString, List<ModelElement> occurences)
 {
     if ( obj.allSpecifications() != null )
     {
         foreach ( Generated.Specification subElement in obj.allSpecifications() )
         {
             searchSpecification ( subElement, searchString, occurences );
         }
     }
     if ( obj.allRequirementSets() != null )
     {
         foreach ( Generated.RequirementSet subElement in obj.allRequirementSets() )
         {
             searchRequirementSet ( subElement, searchString, occurences );
         }
     }
     if ( obj.allRuleDisablings() != null )
     {
         foreach ( Generated.RuleDisabling subElement in obj.allRuleDisablings() )
         {
             searchRuleDisabling ( subElement, searchString, occurences );
         }
     }
     if ( obj.allNameSpaces() != null )
     {
         foreach ( Generated.NameSpace subElement in obj.allNameSpaces() )
         {
             searchNameSpace ( subElement, searchString, occurences );
         }
     }
     if ( obj.allNameSpaceRefs() != null )
     {
         foreach ( Generated.NameSpaceRef subElement in obj.allNameSpaceRefs() )
         {
             searchNameSpaceRef ( subElement, searchString, occurences );
         }
     }
     if ( obj.allTests() != null )
     {
         foreach ( Generated.Frame subElement in obj.allTests() )
         {
             searchFrame ( subElement, searchString, occurences );
         }
     }
     if ( obj.allTestRefs() != null )
     {
         foreach ( Generated.FrameRef subElement in obj.allTestRefs() )
         {
             searchFrameRef ( subElement, searchString, occurences );
         }
     }
     if ( obj.getTranslationDictionary() != null )
     {
         searchTranslationDictionary ( obj.getTranslationDictionary(), searchString, occurences );
     }
     if ( obj.getShortcutDictionary() != null )
     {
         searchShortcutDictionary ( obj.getShortcutDictionary(), searchString, occurences );
     }
     if ( obj.getXsi() != null && obj.getXsi().Contains (searchString) )
     {
         occurences.Add ( obj );
     }
     if ( obj.getXsiLocation() != null && obj.getXsiLocation().Contains (searchString) )
     {
         occurences.Add ( obj );
     }
 }
开发者ID:nikiforovandrey,项目名称:ERTMSFormalSpecs,代码行数:75,代码来源:Comparer.cs


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