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