本文整理汇总了C#中Generated.getUserComment方法的典型用法代码示例。如果您正苦于以下问题:C# Generated.getUserComment方法的具体用法?C# Generated.getUserComment怎么用?C# Generated.getUserComment使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Generated
的用法示例。
在下文中一共展示了Generated.getUserComment方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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.Step obj, bool visitSubNodes)
{
if ( obj.getDescription() != null )
{
obj.setDescription(obj.getDescription().Trim());
}
if ( obj.getObsoleteComment() != null )
{
obj.setObsoleteComment(obj.getObsoleteComment().Trim());
}
if ( obj.getUserComment() != null )
{
obj.setUserComment(obj.getUserComment().Trim());
}
base.visit(obj, visitSubNodes);
}
示例2: compareStep
/// <summary>
/// Compares two Step and annotates the differences on the first one
/// </summary>
/// <param name="obj"></param>
/// <param name="other"></param>
public static void compareStep(Generated.Step obj, Generated.Step other, VersionDiff diff)
{
if ( other == null )
{
diff.appendChanges ( new Diff(obj, HistoricalData.Generated.acceptor.ChangeOperationEnum.aAdd, "", "", obj.Name ) );
return;
}
compareReferencesParagraph (obj, other, diff);
if ( obj.getTCS_Order() != other.getTCS_Order() )
{
diff.appendChanges ( new Diff(obj, HistoricalData.Generated.acceptor.ChangeOperationEnum.aChange, "TCS_Order", other.getTCS_Order().ToString(), obj.getTCS_Order().ToString()) );
}
if ( obj.getDistance() != other.getDistance() )
{
diff.appendChanges ( new Diff(obj, HistoricalData.Generated.acceptor.ChangeOperationEnum.aChange, "Distance", other.getDistance().ToString(), obj.getDistance().ToString()) );
}
if ( !CompareUtil.canonicalStringEquality(obj.getDescription(), other.getDescription()) )
{
diff.appendChanges ( new Diff(obj, HistoricalData.Generated.acceptor.ChangeOperationEnum.aChange, "Description", other.getDescription(), obj.getDescription()) );
}
if ( !CompareUtil.canonicalStringEquality(obj.getObsoleteComment(), other.getObsoleteComment()) )
{
diff.appendChanges ( new Diff(obj, HistoricalData.Generated.acceptor.ChangeOperationEnum.aChange, "ObsoleteComment", other.getObsoleteComment(), obj.getObsoleteComment()) );
}
if ( !CompareUtil.canonicalStringEquality(obj.getUserComment(), other.getUserComment()) )
{
diff.appendChanges ( new Diff(obj, HistoricalData.Generated.acceptor.ChangeOperationEnum.aChange, "UserComment", other.getUserComment(), obj.getUserComment()) );
}
if ( obj.getIO() != other.getIO() )
{
diff.appendChanges ( new Diff(obj, HistoricalData.Generated.acceptor.ChangeOperationEnum.aChange, "IO", other.getIO().ToString(), obj.getIO().ToString()) );
}
if ( obj.getInterface() != other.getInterface() )
{
diff.appendChanges ( new Diff(obj, HistoricalData.Generated.acceptor.ChangeOperationEnum.aChange, "Interface", other.getInterface().ToString(), obj.getInterface().ToString()) );
}
if ( obj.getLevelIN() != other.getLevelIN() )
{
diff.appendChanges ( new Diff(obj, HistoricalData.Generated.acceptor.ChangeOperationEnum.aChange, "LevelIN", other.getLevelIN().ToString(), obj.getLevelIN().ToString()) );
}
if ( obj.getLevelOUT() != other.getLevelOUT() )
{
diff.appendChanges ( new Diff(obj, HistoricalData.Generated.acceptor.ChangeOperationEnum.aChange, "LevelOUT", other.getLevelOUT().ToString(), obj.getLevelOUT().ToString()) );
}
if ( obj.getModeIN() != other.getModeIN() )
{
diff.appendChanges ( new Diff(obj, HistoricalData.Generated.acceptor.ChangeOperationEnum.aChange, "ModeIN", other.getModeIN().ToString(), obj.getModeIN().ToString()) );
}
if ( obj.getModeOUT() != other.getModeOUT() )
{
diff.appendChanges ( new Diff(obj, HistoricalData.Generated.acceptor.ChangeOperationEnum.aChange, "ModeOUT", other.getModeOUT().ToString(), obj.getModeOUT().ToString()) );
}
if ( obj.getTranslationRequired() != other.getTranslationRequired() )
{
diff.appendChanges ( new Diff(obj, HistoricalData.Generated.acceptor.ChangeOperationEnum.aChange, "TranslationRequired", other.getTranslationRequired().ToString(), obj.getTranslationRequired().ToString()) );
}
if ( obj.getTranslated() != other.getTranslated() )
{
diff.appendChanges ( new Diff(obj, HistoricalData.Generated.acceptor.ChangeOperationEnum.aChange, "Translated", other.getTranslated().ToString(), obj.getTranslated().ToString()) );
}
if ( obj.allSubSteps() != null )
{
if ( other.allSubSteps() != null )
{
foreach ( Generated.SubStep subElement in obj.allSubSteps() )
{
bool compared = false;
foreach ( Generated.SubStep otherElement in other.allSubSteps() )
{
if ( subElement.Guid == otherElement.Guid )
{
compareSubStep ( subElement, otherElement, diff );
compared = true;
break;
}
}
if ( !compared )
{
diff.appendChanges ( new Diff(subElement, HistoricalData.Generated.acceptor.ChangeOperationEnum.aAdd, "SubSteps", "", subElement.Name ) );
}
}
foreach ( Generated.SubStep otherElement in other.allSubSteps() )
{
bool found = false;
foreach ( Generated.SubStep subElement in obj.allSubSteps() )
{
if ( subElement.Guid == otherElement.Guid )
{
found = true;
break;
}
//.........这里部分代码省略.........
示例3: DuplicateStep
/// <summary>
/// Duplicates a source Step into its target
/// </summary>
/// <param name="source"></param>
/// <param name="target"></param>
public static void DuplicateStep(Generated.Step source, Generated.Step target)
{
if ( source != null && target != null )
{
DuplicateReferencesParagraph (source, target);
target.setTCS_Order(source.getTCS_Order());
target.setDistance(source.getDistance());
target.setDescription(source.getDescription());
target.setObsoleteComment(source.getObsoleteComment());
target.setUserComment(source.getUserComment());
target.setIO(source.getIO());
target.setInterface(source.getInterface());
target.setLevelIN(source.getLevelIN());
target.setLevelOUT(source.getLevelOUT());
target.setModeIN(source.getModeIN());
target.setModeOUT(source.getModeOUT());
target.setTranslationRequired(source.getTranslationRequired());
target.setTranslated(source.getTranslated());
}
}
示例4: searchStep
/// <summary>
/// Searches a specific string in Step 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 searchStep(Generated.Step obj, string searchString, List<ModelElement> occurences)
{
searchReferencesParagraph (obj, searchString, occurences);
if ( obj.getDescription() != null && obj.getDescription().Contains (searchString) )
{
occurences.Add ( obj );
}
if ( obj.getObsoleteComment() != null && obj.getObsoleteComment().Contains (searchString) )
{
occurences.Add ( obj );
}
if ( obj.getUserComment() != null && obj.getUserComment().Contains (searchString) )
{
occurences.Add ( obj );
}
if ( obj.allSubSteps() != null )
{
foreach ( Generated.SubStep subElement in obj.allSubSteps() )
{
searchSubStep ( subElement, searchString, occurences );
}
}
if ( obj.allMessages() != null )
{
foreach ( Generated.DBMessage subElement in obj.allMessages() )
{
searchDBMessage ( subElement, searchString, occurences );
}
}
}