本文整理汇总了C#中Generated.allProcedures方法的典型用法代码示例。如果您正苦于以下问题:C# Generated.allProcedures方法的具体用法?C# Generated.allProcedures怎么用?C# Generated.allProcedures使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Generated
的用法示例。
在下文中一共展示了Generated.allProcedures方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ensureGuidNameSpace
//.........这里部分代码省略.........
foreach ( Generated.Function subElement in obj.allFunctions() )
{
if ( CompareUtil.canonicalStringEquality(subElement.Name, otherElement.Name) )
{
found = true;
break;
}
}
if ( !found )
{
ensureGuidFunction ( null, otherElement );
}
}
}
else
{
foreach ( Generated.Function subElement in obj.allFunctions() )
{
ensureGuidFunction ( subElement, null );
}
}
}
else
{
if ( other.allFunctions() != null )
{
foreach ( Generated.Function otherElement in other.allFunctions() )
{
ensureGuidFunction ( null, otherElement );
}
}
}
if ( obj.allProcedures() != null )
{
if ( other.allProcedures() != null )
{
foreach ( Generated.Procedure subElement in obj.allProcedures() )
{
bool found = false;
// Try first to assign Guid to elements which do not have a guid
// This helps handling duplicated in lists
foreach ( Generated.Procedure otherElement in other.allProcedures() )
{
if ( CompareUtil.canonicalStringEquality(subElement.Name, otherElement.Name) && otherElement.getGuid() == null )
{
ensureGuidProcedure ( subElement, otherElement );
found = true;
break;
}
}
if ( !found )
{
foreach ( Generated.Procedure otherElement in other.allProcedures() )
{
if ( CompareUtil.canonicalStringEquality(subElement.Name, otherElement.Name) )
{
ensureGuidProcedure ( subElement, otherElement );
found = true;
break;
}
}
}
示例2: compareStructure
/// <summary>
/// Compares two Structure and annotates the differences on the first one
/// </summary>
/// <param name="obj"></param>
/// <param name="other"></param>
public static void compareStructure(Generated.Structure obj, Generated.Structure other, VersionDiff diff)
{
if ( other == null )
{
diff.appendChanges ( new Diff(obj, HistoricalData.Generated.acceptor.ChangeOperationEnum.aAdd, "", "", obj.Name ) );
return;
}
compareType (obj, other, diff);
if ( obj.allElements() != null )
{
if ( other.allElements() != null )
{
foreach ( Generated.StructureElement subElement in obj.allElements() )
{
bool compared = false;
foreach ( Generated.StructureElement otherElement in other.allElements() )
{
if ( subElement.Guid == otherElement.Guid )
{
compareStructureElement ( subElement, otherElement, diff );
compared = true;
break;
}
}
if ( !compared )
{
diff.appendChanges ( new Diff(subElement, HistoricalData.Generated.acceptor.ChangeOperationEnum.aAdd, "Elements", "", subElement.Name ) );
}
}
foreach ( Generated.StructureElement otherElement in other.allElements() )
{
bool found = false;
foreach ( Generated.StructureElement subElement in obj.allElements() )
{
if ( subElement.Guid == otherElement.Guid )
{
found = true;
break;
}
}
if ( !found )
{
diff.appendChanges ( new Diff(obj, HistoricalData.Generated.acceptor.ChangeOperationEnum.aRemove , "Elements", otherElement.Name) );
}
}
}
else
{
foreach ( Generated.StructureElement subElement in obj.allElements() )
{
diff.appendChanges ( new Diff(subElement, HistoricalData.Generated.acceptor.ChangeOperationEnum.aAdd, "Elements", "", subElement.Name ) );
}
}
}
else
{
if ( other.allElements() != null )
{
foreach ( Generated.StructureElement otherElement in other.allElements() )
{
diff.appendChanges ( new Diff(obj, HistoricalData.Generated.acceptor.ChangeOperationEnum.aRemove , "Elements", otherElement.Name) );
}
}
}
if ( obj.allProcedures() != null )
{
if ( other.allProcedures() != null )
{
foreach ( Generated.Procedure subElement in obj.allProcedures() )
{
bool compared = false;
foreach ( Generated.Procedure otherElement in other.allProcedures() )
{
if ( subElement.Guid == otherElement.Guid )
{
compareProcedure ( subElement, otherElement, diff );
compared = true;
break;
}
}
if ( !compared )
{
diff.appendChanges ( new Diff(subElement, HistoricalData.Generated.acceptor.ChangeOperationEnum.aAdd, "Procedures", "", subElement.Name ) );
}
}
foreach ( Generated.Procedure otherElement in other.allProcedures() )
{
bool found = false;
//.........这里部分代码省略.........
示例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 );
}
}
}
示例4: compareNameSpace
//.........这里部分代码省略.........
foreach ( Generated.Function subElement in obj.allFunctions() )
{
if ( subElement.Guid == otherElement.Guid )
{
found = true;
break;
}
}
if ( !found )
{
diff.appendChanges ( new Diff(obj, HistoricalData.Generated.acceptor.ChangeOperationEnum.aRemove , "Functions", otherElement.Name) );
}
}
}
else
{
foreach ( Generated.Function subElement in obj.allFunctions() )
{
diff.appendChanges ( new Diff(subElement, HistoricalData.Generated.acceptor.ChangeOperationEnum.aAdd, "Functions", "", subElement.Name ) );
}
}
}
else
{
if ( other.allFunctions() != null )
{
foreach ( Generated.Function otherElement in other.allFunctions() )
{
diff.appendChanges ( new Diff(obj, HistoricalData.Generated.acceptor.ChangeOperationEnum.aRemove , "Functions", otherElement.Name) );
}
}
}
if ( obj.allProcedures() != null )
{
if ( other.allProcedures() != null )
{
foreach ( Generated.Procedure subElement in obj.allProcedures() )
{
bool compared = false;
foreach ( Generated.Procedure otherElement in other.allProcedures() )
{
if ( subElement.Guid == otherElement.Guid )
{
compareProcedure ( subElement, otherElement, diff );
compared = true;
break;
}
}
if ( !compared )
{
diff.appendChanges ( new Diff(subElement, HistoricalData.Generated.acceptor.ChangeOperationEnum.aAdd, "Procedures", "", subElement.Name ) );
}
}
foreach ( Generated.Procedure otherElement in other.allProcedures() )
{
bool found = false;
foreach ( Generated.Procedure subElement in obj.allProcedures() )
{
if ( subElement.Guid == otherElement.Guid )
{
found = true;
break;
}
示例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 );
}
}