本文整理汇总了C#中Generated.getVersion方法的典型用法代码示例。如果您正苦于以下问题:C# Generated.getVersion方法的具体用法?C# Generated.getVersion怎么用?C# Generated.getVersion使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Generated
的用法示例。
在下文中一共展示了Generated.getVersion方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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.ParagraphRevision obj, bool visitSubNodes)
{
if ( obj.getText() != null )
{
obj.setText(obj.getText().Trim());
}
if ( obj.getVersion() != null )
{
obj.setVersion(obj.getVersion().Trim());
}
base.visit(obj, visitSubNodes);
}
示例2: DuplicateParagraphRevision
/// <summary>
/// Duplicates a source ParagraphRevision into its target
/// </summary>
/// <param name="source"></param>
/// <param name="target"></param>
public static void DuplicateParagraphRevision(Generated.ParagraphRevision source, Generated.ParagraphRevision target)
{
if ( source != null && target != null )
{
target.setText(source.getText());
target.setVersion(source.getVersion());
}
}
示例3: DuplicateSpecification
/// <summary>
/// Duplicates a source Specification into its target
/// </summary>
/// <param name="source"></param>
/// <param name="target"></param>
public static void DuplicateSpecification(Generated.Specification source, Generated.Specification target)
{
if ( source != null && target != null )
{
DuplicateNamable (source, target);
target.setVersion(source.getVersion());
}
}
示例4: compareSpecification
/// <summary>
/// Compares two Specification and annotates the differences on the first one
/// </summary>
/// <param name="obj"></param>
/// <param name="other"></param>
public static void compareSpecification(Generated.Specification obj, Generated.Specification 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.getVersion(), other.getVersion()) )
{
diff.appendChanges ( new Diff(obj, HistoricalData.Generated.acceptor.ChangeOperationEnum.aChange, "Version", other.getVersion(), obj.getVersion()) );
}
if ( obj.allChapters() != null )
{
if ( other.allChapters() != null )
{
foreach ( Generated.Chapter subElement in obj.allChapters() )
{
bool compared = false;
foreach ( Generated.Chapter otherElement in other.allChapters() )
{
if ( subElement.Guid == otherElement.Guid )
{
compareChapter ( subElement, otherElement, diff );
compared = true;
break;
}
}
if ( !compared )
{
diff.appendChanges ( new Diff(subElement, HistoricalData.Generated.acceptor.ChangeOperationEnum.aAdd, "Chapters", "", subElement.Name ) );
}
}
foreach ( Generated.Chapter otherElement in other.allChapters() )
{
bool found = false;
foreach ( Generated.Chapter subElement in obj.allChapters() )
{
if ( subElement.Guid == otherElement.Guid )
{
found = true;
break;
}
}
if ( !found )
{
diff.appendChanges ( new Diff(obj, HistoricalData.Generated.acceptor.ChangeOperationEnum.aRemove , "Chapters", otherElement.Name) );
}
}
}
else
{
foreach ( Generated.Chapter subElement in obj.allChapters() )
{
diff.appendChanges ( new Diff(subElement, HistoricalData.Generated.acceptor.ChangeOperationEnum.aAdd, "Chapters", "", subElement.Name ) );
}
}
}
else
{
if ( other.allChapters() != null )
{
foreach ( Generated.Chapter otherElement in other.allChapters() )
{
diff.appendChanges ( new Diff(obj, HistoricalData.Generated.acceptor.ChangeOperationEnum.aRemove , "Chapters", otherElement.Name) );
}
}
}
if ( obj.allChapterRefs() != null )
{
if ( other.allChapterRefs() != null )
{
foreach ( Generated.ChapterRef subElement in obj.allChapterRefs() )
{
bool compared = false;
foreach ( Generated.ChapterRef otherElement in other.allChapterRefs() )
{
if ( subElement.Guid == otherElement.Guid )
{
compareChapterRef ( subElement, otherElement, diff );
compared = true;
break;
}
}
if ( !compared )
{
diff.appendChanges ( new Diff(subElement, HistoricalData.Generated.acceptor.ChangeOperationEnum.aAdd, "ChapterRefs", "", subElement.Name ) );
}
}
//.........这里部分代码省略.........
示例5: 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());
}
}
示例6: compareParagraphRevision
/// <summary>
/// Compares two ParagraphRevision and annotates the differences on the first one
/// </summary>
/// <param name="obj"></param>
/// <param name="other"></param>
public static void compareParagraphRevision(Generated.ParagraphRevision obj, Generated.ParagraphRevision other, VersionDiff diff)
{
if ( other == null )
{
diff.appendChanges ( new Diff(obj, HistoricalData.Generated.acceptor.ChangeOperationEnum.aAdd, "", "", obj.Name ) );
return;
}
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()) );
}
}
示例7: 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 )
{
//.........这里部分代码省略.........
示例8: searchSpecification
/// <summary>
/// Searches a specific string in Specification 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 searchSpecification(Generated.Specification obj, string searchString, List<ModelElement> occurences)
{
searchNamable (obj, searchString, occurences);
if ( obj.getVersion() != null && obj.getVersion().Contains (searchString) )
{
occurences.Add ( obj );
}
if ( obj.allChapters() != null )
{
foreach ( Generated.Chapter subElement in obj.allChapters() )
{
searchChapter ( subElement, searchString, occurences );
}
}
if ( obj.allChapterRefs() != null )
{
foreach ( Generated.ChapterRef subElement in obj.allChapterRefs() )
{
searchChapterRef ( subElement, searchString, occurences );
}
}
}
示例9: searchParagraphRevision
/// <summary>
/// Searches a specific string in ParagraphRevision 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 searchParagraphRevision(Generated.ParagraphRevision obj, string searchString, List<ModelElement> occurences)
{
if ( obj.getText() != null && obj.getText().Contains (searchString) )
{
occurences.Add ( obj );
}
if ( obj.getVersion() != null && obj.getVersion().Contains (searchString) )
{
occurences.Add ( obj );
}
}
示例10: 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 );
}
}