本文整理汇总了C#中Generated.allParameters方法的典型用法代码示例。如果您正苦于以下问题:C# Generated.allParameters方法的具体用法?C# Generated.allParameters怎么用?C# Generated.allParameters使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Generated
的用法示例。
在下文中一共展示了Generated.allParameters方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ensureGuidProcedure
//.........这里部分代码省略.........
foreach ( Generated.Rule subElement in obj.allRules() )
{
if ( CompareUtil.canonicalStringEquality(subElement.Name, otherElement.Name) )
{
found = true;
break;
}
}
if ( !found )
{
ensureGuidRule ( null, otherElement );
}
}
}
else
{
foreach ( Generated.Rule subElement in obj.allRules() )
{
ensureGuidRule ( subElement, null );
}
}
}
else
{
if ( other.allRules() != null )
{
foreach ( Generated.Rule otherElement in other.allRules() )
{
ensureGuidRule ( null, otherElement );
}
}
}
if ( obj.allParameters() != null )
{
if ( other.allParameters() != null )
{
foreach ( Generated.Parameter subElement in obj.allParameters() )
{
bool found = false;
// Try first to assign Guid to elements which do not have a guid
// This helps handling duplicated in lists
foreach ( Generated.Parameter otherElement in other.allParameters() )
{
if ( CompareUtil.canonicalStringEquality(subElement.Name, otherElement.Name) && otherElement.getGuid() == null )
{
ensureGuidParameter ( subElement, otherElement );
found = true;
break;
}
}
if ( !found )
{
foreach ( Generated.Parameter otherElement in other.allParameters() )
{
if ( CompareUtil.canonicalStringEquality(subElement.Name, otherElement.Name) )
{
ensureGuidParameter ( subElement, otherElement );
found = true;
break;
}
}
}
示例2: compareProcedure
/// <summary>
/// Compares two Procedure and annotates the differences on the first one
/// </summary>
/// <param name="obj"></param>
/// <param name="other"></param>
public static void compareProcedure(Generated.Procedure obj, Generated.Procedure other, VersionDiff diff)
{
if ( other == null )
{
diff.appendChanges ( new Diff(obj, HistoricalData.Generated.acceptor.ChangeOperationEnum.aAdd, "", "", obj.Name ) );
return;
}
compareReqRelated (obj, other, diff);
if ( obj.getStateMachine() == null )
{
if ( other.getStateMachine() != null )
{
diff.appendChanges ( new Diff(obj, HistoricalData.Generated.acceptor.ChangeOperationEnum.aChange, "StateMachine", "" ) );
}
}
else
{
compareStateMachine ( obj.getStateMachine(), other.getStateMachine(), diff );
}
if ( obj.allRules() != null )
{
if ( other.allRules() != null )
{
foreach ( Generated.Rule subElement in obj.allRules() )
{
bool compared = false;
foreach ( Generated.Rule otherElement in other.allRules() )
{
if ( subElement.Guid == otherElement.Guid )
{
compareRule ( subElement, otherElement, diff );
compared = true;
break;
}
}
if ( !compared )
{
diff.appendChanges ( new Diff(subElement, HistoricalData.Generated.acceptor.ChangeOperationEnum.aAdd, "Rules", "", subElement.Name ) );
}
}
foreach ( Generated.Rule otherElement in other.allRules() )
{
bool found = false;
foreach ( Generated.Rule subElement in obj.allRules() )
{
if ( subElement.Guid == otherElement.Guid )
{
found = true;
break;
}
}
if ( !found )
{
diff.appendChanges ( new Diff(obj, HistoricalData.Generated.acceptor.ChangeOperationEnum.aRemove , "Rules", otherElement.Name) );
}
}
}
else
{
foreach ( Generated.Rule subElement in obj.allRules() )
{
diff.appendChanges ( new Diff(subElement, HistoricalData.Generated.acceptor.ChangeOperationEnum.aAdd, "Rules", "", subElement.Name ) );
}
}
}
else
{
if ( other.allRules() != null )
{
foreach ( Generated.Rule otherElement in other.allRules() )
{
diff.appendChanges ( new Diff(obj, HistoricalData.Generated.acceptor.ChangeOperationEnum.aRemove , "Rules", otherElement.Name) );
}
}
}
if ( obj.allParameters() != null )
{
if ( other.allParameters() != null )
{
foreach ( Generated.Parameter subElement in obj.allParameters() )
{
bool compared = false;
foreach ( Generated.Parameter otherElement in other.allParameters() )
{
if ( subElement.Guid == otherElement.Guid )
{
compareParameter ( subElement, otherElement, diff );
compared = true;
break;
}
//.........这里部分代码省略.........
示例3: searchFunction
/// <summary>
/// Searches a specific string in Function 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 searchFunction(Generated.Function obj, string searchString, List<ModelElement> occurences)
{
searchType (obj, searchString, occurences);
if ( obj.allParameters() != null )
{
foreach ( Generated.Parameter subElement in obj.allParameters() )
{
searchParameter ( subElement, searchString, occurences );
}
}
if ( obj.allCases() != null )
{
foreach ( Generated.Case subElement in obj.allCases() )
{
searchCase ( subElement, searchString, occurences );
}
}
if ( obj.getTypeName() != null && obj.getTypeName().Contains (searchString) )
{
occurences.Add ( obj );
}
}
示例4: searchProcedure
/// <summary>
/// Searches a specific string in Procedure 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 searchProcedure(Generated.Procedure obj, string searchString, List<ModelElement> occurences)
{
searchReqRelated (obj, searchString, occurences);
if ( obj.getStateMachine() != null )
{
searchStateMachine ( obj.getStateMachine(), searchString, occurences );
}
if ( obj.allRules() != null )
{
foreach ( Generated.Rule subElement in obj.allRules() )
{
searchRule ( subElement, searchString, occurences );
}
}
if ( obj.allParameters() != null )
{
foreach ( Generated.Parameter subElement in obj.allParameters() )
{
searchParameter ( subElement, searchString, occurences );
}
}
}
示例5: compareFunction
/// <summary>
/// Compares two Function and annotates the differences on the first one
/// </summary>
/// <param name="obj"></param>
/// <param name="other"></param>
public static void compareFunction(Generated.Function obj, Generated.Function 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.allParameters() != null )
{
if ( other.allParameters() != null )
{
foreach ( Generated.Parameter subElement in obj.allParameters() )
{
bool compared = false;
foreach ( Generated.Parameter otherElement in other.allParameters() )
{
if ( subElement.Guid == otherElement.Guid )
{
compareParameter ( subElement, otherElement, diff );
compared = true;
break;
}
}
if ( !compared )
{
diff.appendChanges ( new Diff(subElement, HistoricalData.Generated.acceptor.ChangeOperationEnum.aAdd, "Parameters", "", subElement.Name ) );
}
}
foreach ( Generated.Parameter otherElement in other.allParameters() )
{
bool found = false;
foreach ( Generated.Parameter subElement in obj.allParameters() )
{
if ( subElement.Guid == otherElement.Guid )
{
found = true;
break;
}
}
if ( !found )
{
diff.appendChanges ( new Diff(obj, HistoricalData.Generated.acceptor.ChangeOperationEnum.aRemove , "Parameters", otherElement.Name) );
}
}
}
else
{
foreach ( Generated.Parameter subElement in obj.allParameters() )
{
diff.appendChanges ( new Diff(subElement, HistoricalData.Generated.acceptor.ChangeOperationEnum.aAdd, "Parameters", "", subElement.Name ) );
}
}
}
else
{
if ( other.allParameters() != null )
{
foreach ( Generated.Parameter otherElement in other.allParameters() )
{
diff.appendChanges ( new Diff(obj, HistoricalData.Generated.acceptor.ChangeOperationEnum.aRemove , "Parameters", otherElement.Name) );
}
}
}
if ( obj.allCases() != null )
{
if ( other.allCases() != null )
{
int i = 0;
while ( i < obj.countCases() && i < other.countCases() )
{
Generated.Case element = obj.getCases( i );
Generated.Case otherElement = other.getCases( i );
compareCase ( element, otherElement, diff );
i += 1;
}
while ( i < obj.countCases() )
{
diff.appendChanges ( new Diff(obj.getCases(i), HistoricalData.Generated.acceptor.ChangeOperationEnum.aAdd, "Cases", "", obj.getCases( i ).Name ) );
i += 1;
}
while ( i < other.countCases() )
{
diff.appendChanges ( new Diff(obj, HistoricalData.Generated.acceptor.ChangeOperationEnum.aRemove, "Cases", other.getCases( i ).Name) );
i += 1;
}
}
else
{
foreach ( Generated.Case subElement in obj.allCases() )
//.........这里部分代码省略.........