本文整理汇总了C#中Generated.getId方法的典型用法代码示例。如果您正苦于以下问题:C# Generated.getId方法的具体用法?C# Generated.getId怎么用?C# Generated.getId使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Generated
的用法示例。
在下文中一共展示了Generated.getId方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: visit
/// <summary>
/// Cleans all text fields in this element
/// </summary>
/// <param name="obj"></param>
/// <param name="visitSubNodes"></param>
public override void visit(Generated.Paragraph obj, bool visitSubNodes)
{
if ( obj.getId() != null )
{
obj.setId(obj.getId().Trim());
}
if ( obj.getBl() != null )
{
obj.setBl(obj.getBl().Trim());
}
if ( obj.getText() != null )
{
obj.setText(obj.getText().Trim());
}
if ( obj.getVersion() != null )
{
obj.setVersion(obj.getVersion().Trim());
}
if ( obj.getObsoleteFunctionalBlockName() != null )
{
obj.setObsoleteFunctionalBlockName(obj.getObsoleteFunctionalBlockName().Trim());
}
if ( obj.getObsoleteGuid() != null )
{
obj.setObsoleteGuid(obj.getObsoleteGuid().Trim());
}
base.visit(obj, visitSubNodes);
}
示例2: DuplicateChapter
/// <summary>
/// Duplicates a source Chapter into its target
/// </summary>
/// <param name="source"></param>
/// <param name="target"></param>
public static void DuplicateChapter(Generated.Chapter source, Generated.Chapter target)
{
if ( source != null && target != null )
{
DuplicateNamable (source, target);
target.setId(source.getId());
}
}
示例3: DuplicateParagraph
/// <summary>
/// Duplicates a source Paragraph into its target
/// </summary>
/// <param name="source"></param>
/// <param name="target"></param>
public static void DuplicateParagraph(Generated.Paragraph source, Generated.Paragraph target)
{
if ( source != null && target != null )
{
DuplicateReferencesParagraph (source, target);
target.setId(source.getId());
target.setType(source.getType());
target.setBl(source.getBl());
target.setOptional(source.getOptional());
target.setText(source.getText());
target.setVersion(source.getVersion());
target.setReviewed(source.getReviewed());
target.setImplementationStatus(source.getImplementationStatus());
target.setMoreInfoRequired(source.getMoreInfoRequired());
target.setSpecIssue(source.getSpecIssue());
target.setTested(source.getTested());
}
}
示例4: compareParagraph
/// <summary>
/// Compares two Paragraph and annotates the differences on the first one
/// </summary>
/// <param name="obj"></param>
/// <param name="other"></param>
public static void compareParagraph(Generated.Paragraph obj, Generated.Paragraph other, VersionDiff diff)
{
if ( other == null )
{
diff.appendChanges ( new Diff(obj, HistoricalData.Generated.acceptor.ChangeOperationEnum.aAdd, "", "", obj.Name ) );
return;
}
compareReferencesParagraph (obj, other, diff);
if ( !CompareUtil.canonicalStringEquality(obj.getId(), other.getId()) )
{
diff.appendChanges ( new Diff(obj, HistoricalData.Generated.acceptor.ChangeOperationEnum.aChange, "Id", other.getId(), obj.getId()) );
}
if ( obj.getType() != other.getType() )
{
diff.appendChanges ( new Diff(obj, HistoricalData.Generated.acceptor.ChangeOperationEnum.aChange, "Type", other.getType().ToString(), obj.getType().ToString()) );
}
if ( !CompareUtil.canonicalStringEquality(obj.getBl(), other.getBl()) )
{
diff.appendChanges ( new Diff(obj, HistoricalData.Generated.acceptor.ChangeOperationEnum.aChange, "Bl", other.getBl(), obj.getBl()) );
}
if ( obj.getOptional() != other.getOptional() )
{
diff.appendChanges ( new Diff(obj, HistoricalData.Generated.acceptor.ChangeOperationEnum.aChange, "Optional", other.getOptional().ToString(), obj.getOptional().ToString()) );
}
if ( !CompareUtil.canonicalStringEquality(obj.getText(), other.getText()) )
{
diff.appendChanges ( new Diff(obj, HistoricalData.Generated.acceptor.ChangeOperationEnum.aChange, "Text", other.getText(), obj.getText()) );
}
if ( !CompareUtil.canonicalStringEquality(obj.getVersion(), other.getVersion()) )
{
diff.appendChanges ( new Diff(obj, HistoricalData.Generated.acceptor.ChangeOperationEnum.aChange, "Version", other.getVersion(), obj.getVersion()) );
}
if ( obj.getReviewed() != other.getReviewed() )
{
diff.appendChanges ( new Diff(obj, HistoricalData.Generated.acceptor.ChangeOperationEnum.aChange, "Reviewed", other.getReviewed().ToString(), obj.getReviewed().ToString()) );
}
if ( obj.getImplementationStatus() != other.getImplementationStatus() )
{
diff.appendChanges ( new Diff(obj, HistoricalData.Generated.acceptor.ChangeOperationEnum.aChange, "ImplementationStatus", other.getImplementationStatus().ToString(), obj.getImplementationStatus().ToString()) );
}
if ( obj.allParagraphs() != null )
{
if ( other.allParagraphs() != null )
{
foreach ( Generated.Paragraph subElement in obj.allParagraphs() )
{
bool compared = false;
foreach ( Generated.Paragraph otherElement in other.allParagraphs() )
{
if ( subElement.Guid == otherElement.Guid )
{
compareParagraph ( subElement, otherElement, diff );
compared = true;
break;
}
}
if ( !compared )
{
diff.appendChanges ( new Diff(subElement, HistoricalData.Generated.acceptor.ChangeOperationEnum.aAdd, "Paragraphs", "", subElement.Name ) );
}
}
foreach ( Generated.Paragraph otherElement in other.allParagraphs() )
{
bool found = false;
foreach ( Generated.Paragraph subElement in obj.allParagraphs() )
{
if ( subElement.Guid == otherElement.Guid )
{
found = true;
break;
}
}
if ( !found )
{
diff.appendChanges ( new Diff(obj, HistoricalData.Generated.acceptor.ChangeOperationEnum.aRemove , "Paragraphs", otherElement.Name) );
}
}
}
else
{
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 )
{
//.........这里部分代码省略.........
示例5: searchReqRef
/// <summary>
/// Searches a specific string in ReqRef 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 searchReqRef(Generated.ReqRef obj, string searchString, List<ModelElement> occurences)
{
if ( obj.getId() != null && obj.getId().Contains (searchString) )
{
occurences.Add ( obj );
}
if ( obj.getSpecId() != null && obj.getSpecId().Contains (searchString) )
{
occurences.Add ( obj );
}
if ( obj.getComment() != null && obj.getComment().Contains (searchString) )
{
occurences.Add ( obj );
}
}
示例6: 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 );
}
}
示例7: searchChapter
/// <summary>
/// Searches a specific string in Chapter 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 searchChapter(Generated.Chapter obj, string searchString, List<ModelElement> occurences)
{
searchNamable (obj, searchString, occurences);
if ( obj.getId() != null && obj.getId().Contains (searchString) )
{
occurences.Add ( obj );
}
if ( obj.allParagraphs() != null )
{
foreach ( Generated.Paragraph subElement in obj.allParagraphs() )
{
searchParagraph ( subElement, searchString, occurences );
}
}
}
示例8: compareChapter
/// <summary>
/// Compares two Chapter and annotates the differences on the first one
/// </summary>
/// <param name="obj"></param>
/// <param name="other"></param>
public static void compareChapter(Generated.Chapter obj, Generated.Chapter other, VersionDiff diff)
{
if ( other == null )
{
diff.appendChanges ( new Diff(obj, HistoricalData.Generated.acceptor.ChangeOperationEnum.aAdd, "", "", obj.Name ) );
return;
}
compareNamable (obj, other, diff);
if ( !CompareUtil.canonicalStringEquality(obj.getId(), other.getId()) )
{
diff.appendChanges ( new Diff(obj, HistoricalData.Generated.acceptor.ChangeOperationEnum.aChange, "Id", other.getId(), obj.getId()) );
}
if ( obj.allParagraphs() != null )
{
if ( other.allParagraphs() != null )
{
foreach ( Generated.Paragraph subElement in obj.allParagraphs() )
{
bool compared = false;
foreach ( Generated.Paragraph otherElement in other.allParagraphs() )
{
if ( subElement.Guid == otherElement.Guid )
{
compareParagraph ( subElement, otherElement, diff );
compared = true;
break;
}
}
if ( !compared )
{
diff.appendChanges ( new Diff(subElement, HistoricalData.Generated.acceptor.ChangeOperationEnum.aAdd, "Paragraphs", "", subElement.Name ) );
}
}
foreach ( Generated.Paragraph otherElement in other.allParagraphs() )
{
bool found = false;
foreach ( Generated.Paragraph subElement in obj.allParagraphs() )
{
if ( subElement.Guid == otherElement.Guid )
{
found = true;
break;
}
}
if ( !found )
{
diff.appendChanges ( new Diff(obj, HistoricalData.Generated.acceptor.ChangeOperationEnum.aRemove , "Paragraphs", otherElement.Name) );
}
}
}
else
{
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) );
}
}
}
}