本文整理汇总了C#中Trace.InsertStep方法的典型用法代码示例。如果您正苦于以下问题:C# Trace.InsertStep方法的具体用法?C# Trace.InsertStep怎么用?C# Trace.InsertStep使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Trace
的用法示例。
在下文中一共展示了Trace.InsertStep方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GenerateTrace
public Trace GenerateTrace()
{
Trace t = new Trace();
for (TraversalInfo ti = this; ti.Predecessor != null; ti = ti.Predecessor)
{
if (ZingerConfiguration.CompactTraces && !ti.Predecessor.HasMultipleSuccessors)
{
// Its obvious how we got here, don't waste space
// storing this trace step
continue;
}
ViaChoose vc = ti.Via as ViaChoose;
ViaExecute ve = ti.Via as ViaExecute;
if (vc != null)
t.InsertStep(new TraceStep(false, vc.ChoiceNumber));
else if (ve != null)
t.InsertStep(new TraceStep(true, ve.ProcessExecuted));
else
throw new NotImplementedException("Summaries not yet supported in traces");
}
return t;
}
示例2: GenerateNonCompactTrace
/// <summary>
/// Generate Noncompact trace for Error Reporting
/// </summary>
/// <returns></returns>
public Trace GenerateNonCompactTrace()
{
Trace t = new Trace();
for (TraversalInfo ti = this; ti.Predecessor != null; ti = ti.Predecessor)
{
ViaChoose vc = ti.Via as ViaChoose;
ViaExecute ve = ti.Via as ViaExecute;
if (vc != null)
t.InsertStep(new TraceStep(false, vc.ChoiceNumber));
else if (ve != null)
t.InsertStep(new TraceStep(true, ve.ProcessExecuted));
else
throw new NotImplementedException("Summaries not yet supported in traces");
}
return t;
}