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


C# Generated.allStateMachines方法代码示例

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


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

示例1: ensureGuidNameSpace


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

                        if ( !found )
                        {
                            ensureGuidCollection ( null, otherElement );
                        }
                    }
                }
                else
                {
                    foreach ( Generated.Collection subElement in obj.allCollections() )
                    {
                        ensureGuidCollection ( subElement, null );
                    }
                }
            }
            else
            {
                if ( other.allCollections() != null )
                {
                    foreach ( Generated.Collection otherElement in other.allCollections() )
                    {
                        ensureGuidCollection ( null, otherElement );
                    }
                }
            }
            if ( obj.allStateMachines() != null )
            {
                if ( other.allStateMachines() != null )
                {
                    foreach ( Generated.StateMachine subElement in obj.allStateMachines() )
                    {
                        bool found = false;

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

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

示例2: compareStructure


//.........这里部分代码省略.........
                        foreach ( Generated.Procedure subElement in obj.allProcedures() )
                        {
                            if ( subElement.Guid == otherElement.Guid )
                            {
                                found = true;
                                break;
                            }
                        }

                        if ( !found )
                        {
                            diff.appendChanges ( new Diff(obj, HistoricalData.Generated.acceptor.ChangeOperationEnum.aRemove , "Procedures", otherElement.Name) );
                        }
                    }
                }
                else
                {
                    foreach ( Generated.Procedure subElement in obj.allProcedures() )
                    {
                        diff.appendChanges ( new Diff(subElement, HistoricalData.Generated.acceptor.ChangeOperationEnum.aAdd, "Procedures", "", subElement.Name ) );
                    }
                }
            }
            else
            {
                if ( other.allProcedures() != null )
                {
                    foreach ( Generated.Procedure otherElement in other.allProcedures() )
                    {
                        diff.appendChanges ( new Diff(obj, HistoricalData.Generated.acceptor.ChangeOperationEnum.aRemove , "Procedures", otherElement.Name) );
                    }
                }
            }
            if ( obj.allStateMachines() != null )
            {
                if ( other.allStateMachines() != null )
                {
                    foreach ( Generated.StateMachine subElement in obj.allStateMachines() )
                    {
                        bool compared = false;
                        foreach ( Generated.StateMachine otherElement in other.allStateMachines() )
                        {
                            if ( subElement.Guid == otherElement.Guid )
                            {
                                compareStateMachine ( subElement, otherElement, diff );
                                compared = true;
                            break;
                            }
                        }

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

                    foreach ( Generated.StateMachine otherElement in other.allStateMachines() )
                    {
                        bool found = false;
                        foreach ( Generated.StateMachine subElement in obj.allStateMachines() )
                        {
                            if ( subElement.Guid == otherElement.Guid )
                            {
                                found = true;
                                break;
                            }
开发者ID:nikiforovandrey,项目名称:ERTMSFormalSpecs,代码行数:67,代码来源:Comparer.cs

示例3: searchStructure

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

            if ( obj.allElements() != null )
            {
                foreach ( Generated.StructureElement subElement in obj.allElements() )
                {
                    searchStructureElement ( subElement, searchString, occurences );
                }
            }
            if ( obj.allProcedures() != null )
            {
                foreach ( Generated.Procedure subElement in obj.allProcedures() )
                {
                    searchProcedure ( subElement, searchString, occurences );
                }
            }
            if ( obj.allStateMachines() != null )
            {
                foreach ( Generated.StateMachine subElement in obj.allStateMachines() )
                {
                    searchStateMachine ( subElement, searchString, occurences );
                }
            }
            if ( obj.allRules() != null )
            {
                foreach ( Generated.Rule subElement in obj.allRules() )
                {
                    searchRule ( subElement, searchString, occurences );
                }
            }
            if ( obj.allInterfaces() != null )
            {
                foreach ( Generated.StructureRef subElement in obj.allInterfaces() )
                {
                    searchStructureRef ( subElement, searchString, occurences );
                }
            }
        }
开发者ID:nikiforovandrey,项目名称:ERTMSFormalSpecs,代码行数:47,代码来源:Comparer.cs

示例4: compareNameSpace


//.........这里部分代码省略.........
                        foreach ( Generated.Collection subElement in obj.allCollections() )
                        {
                            if ( subElement.Guid == otherElement.Guid )
                            {
                                found = true;
                                break;
                            }
                        }

                        if ( !found )
                        {
                            diff.appendChanges ( new Diff(obj, HistoricalData.Generated.acceptor.ChangeOperationEnum.aRemove , "Collections", otherElement.Name) );
                        }
                    }
                }
                else
                {
                    foreach ( Generated.Collection subElement in obj.allCollections() )
                    {
                        diff.appendChanges ( new Diff(subElement, HistoricalData.Generated.acceptor.ChangeOperationEnum.aAdd, "Collections", "", subElement.Name ) );
                    }
                }
            }
            else
            {
                if ( other.allCollections() != null )
                {
                    foreach ( Generated.Collection otherElement in other.allCollections() )
                    {
                        diff.appendChanges ( new Diff(obj, HistoricalData.Generated.acceptor.ChangeOperationEnum.aRemove , "Collections", otherElement.Name) );
                    }
                }
            }
            if ( obj.allStateMachines() != null )
            {
                if ( other.allStateMachines() != null )
                {
                    foreach ( Generated.StateMachine subElement in obj.allStateMachines() )
                    {
                        bool compared = false;
                        foreach ( Generated.StateMachine otherElement in other.allStateMachines() )
                        {
                            if ( subElement.Guid == otherElement.Guid )
                            {
                                compareStateMachine ( subElement, otherElement, diff );
                                compared = true;
                            break;
                            }
                        }

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

                    foreach ( Generated.StateMachine otherElement in other.allStateMachines() )
                    {
                        bool found = false;
                        foreach ( Generated.StateMachine subElement in obj.allStateMachines() )
                        {
                            if ( subElement.Guid == otherElement.Guid )
                            {
                                found = true;
                                break;
                            }
开发者ID:nikiforovandrey,项目名称:ERTMSFormalSpecs,代码行数:67,代码来源:Comparer.cs

示例5: searchNameSpace

        /// <summary>
        /// Searches a specific string in NameSpace 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 searchNameSpace(Generated.NameSpace obj, string searchString, List<ModelElement> occurences)
        {
            searchNamable (obj, 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.allRanges() != null )
            {
                foreach ( Generated.Range subElement in obj.allRanges() )
                {
                    searchRange ( subElement, searchString, occurences );
                }
            }
            if ( obj.allEnumerations() != null )
            {
                foreach ( Generated.Enum subElement in obj.allEnumerations() )
                {
                    searchEnum ( subElement, searchString, occurences );
                }
            }
            if ( obj.allStructures() != null )
            {
                foreach ( Generated.Structure subElement in obj.allStructures() )
                {
                    searchStructure ( subElement, searchString, occurences );
                }
            }
            if ( obj.allCollections() != null )
            {
                foreach ( Generated.Collection subElement in obj.allCollections() )
                {
                    searchCollection ( subElement, searchString, occurences );
                }
            }
            if ( obj.allStateMachines() != null )
            {
                foreach ( Generated.StateMachine subElement in obj.allStateMachines() )
                {
                    searchStateMachine ( subElement, searchString, occurences );
                }
            }
            if ( obj.allFunctions() != null )
            {
                foreach ( Generated.Function subElement in obj.allFunctions() )
                {
                    searchFunction ( subElement, searchString, occurences );
                }
            }
            if ( obj.allProcedures() != null )
            {
                foreach ( Generated.Procedure subElement in obj.allProcedures() )
                {
                    searchProcedure ( subElement, searchString, occurences );
                }
            }
            if ( obj.allVariables() != null )
            {
                foreach ( Generated.Variable subElement in obj.allVariables() )
                {
                    searchVariable ( subElement, searchString, occurences );
                }
            }
            if ( obj.allRules() != null )
            {
                foreach ( Generated.Rule subElement in obj.allRules() )
                {
                    searchRule ( subElement, searchString, occurences );
                }
            }
            if ( obj.getComment() != null && obj.getComment().Contains (searchString) )
            {
                occurences.Add ( obj );
            }
        }
开发者ID:nikiforovandrey,项目名称:ERTMSFormalSpecs,代码行数:93,代码来源:Comparer.cs


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