本文整理汇总了C#中Generated.getCycleDuration方法的典型用法代码示例。如果您正苦于以下问题:C# Generated.getCycleDuration方法的具体用法?C# Generated.getCycleDuration怎么用?C# Generated.getCycleDuration使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Generated
的用法示例。
在下文中一共展示了Generated.getCycleDuration方法的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.Frame obj, bool visitSubNodes)
{
if ( obj.getCycleDuration() != null )
{
obj.setCycleDuration(obj.getCycleDuration().Trim());
}
if ( obj.getComment() != null )
{
obj.setComment(obj.getComment().Trim());
}
base.visit(obj, visitSubNodes);
}
示例2: searchFrame
/// <summary>
/// Searches a specific string in Frame 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 searchFrame(Generated.Frame obj, string searchString, List<ModelElement> occurences)
{
searchNamable (obj, searchString, occurences);
if ( obj.getCycleDuration() != null && obj.getCycleDuration().Contains (searchString) )
{
occurences.Add ( obj );
}
if ( obj.allSubSequences() != null )
{
foreach ( Generated.SubSequence subElement in obj.allSubSequences() )
{
searchSubSequence ( subElement, searchString, occurences );
}
}
if ( obj.getComment() != null && obj.getComment().Contains (searchString) )
{
occurences.Add ( obj );
}
}
示例3: DuplicateFrame
/// <summary>
/// Duplicates a source Frame into its target
/// </summary>
/// <param name="source"></param>
/// <param name="target"></param>
public static void DuplicateFrame(Generated.Frame source, Generated.Frame target)
{
if ( source != null && target != null )
{
DuplicateNamable (source, target);
target.setCycleDuration(source.getCycleDuration());
target.setComment(source.getComment());
}
}
示例4: compareFrame
/// <summary>
/// Compares two Frame and annotates the differences on the first one
/// </summary>
/// <param name="obj"></param>
/// <param name="other"></param>
public static void compareFrame(Generated.Frame obj, Generated.Frame 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.getCycleDuration(), other.getCycleDuration()) )
{
diff.appendChanges ( new Diff(obj, HistoricalData.Generated.acceptor.ChangeOperationEnum.aChange, "CycleDuration", other.getCycleDuration(), obj.getCycleDuration()) );
}
if ( obj.allSubSequences() != null )
{
if ( other.allSubSequences() != null )
{
foreach ( Generated.SubSequence subElement in obj.allSubSequences() )
{
bool compared = false;
foreach ( Generated.SubSequence otherElement in other.allSubSequences() )
{
if ( subElement.Guid == otherElement.Guid )
{
compareSubSequence ( subElement, otherElement, diff );
compared = true;
break;
}
}
if ( !compared )
{
diff.appendChanges ( new Diff(subElement, HistoricalData.Generated.acceptor.ChangeOperationEnum.aAdd, "SubSequences", "", subElement.Name ) );
}
}
foreach ( Generated.SubSequence otherElement in other.allSubSequences() )
{
bool found = false;
foreach ( Generated.SubSequence subElement in obj.allSubSequences() )
{
if ( subElement.Guid == otherElement.Guid )
{
found = true;
break;
}
}
if ( !found )
{
diff.appendChanges ( new Diff(obj, HistoricalData.Generated.acceptor.ChangeOperationEnum.aRemove , "SubSequences", otherElement.Name) );
}
}
}
else
{
foreach ( Generated.SubSequence subElement in obj.allSubSequences() )
{
diff.appendChanges ( new Diff(subElement, HistoricalData.Generated.acceptor.ChangeOperationEnum.aAdd, "SubSequences", "", subElement.Name ) );
}
}
}
else
{
if ( other.allSubSequences() != null )
{
foreach ( Generated.SubSequence otherElement in other.allSubSequences() )
{
diff.appendChanges ( new Diff(obj, HistoricalData.Generated.acceptor.ChangeOperationEnum.aRemove , "SubSequences", otherElement.Name) );
}
}
}
if ( !CompareUtil.canonicalStringEquality(obj.getComment(), other.getComment()) )
{
diff.appendChanges ( new Diff(obj, HistoricalData.Generated.acceptor.ChangeOperationEnum.aChange, "Comment", other.getComment(), obj.getComment()) );
}
}