本文整理汇总了C#中Microsoft.VisualStudio.Debugger.Evaluation.DkmInspectionContext.With方法的典型用法代码示例。如果您正苦于以下问题:C# DkmInspectionContext.With方法的具体用法?C# DkmInspectionContext.With怎么用?C# DkmInspectionContext.With使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Microsoft.VisualStudio.Debugger.Evaluation.DkmInspectionContext
的用法示例。
在下文中一共展示了DkmInspectionContext.With方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: EnumContextDataItem
void IDkmClrResultProvider.GetChildren(DkmEvaluationResult evaluationResult, DkmWorkList workList, int initialRequestSize, DkmInspectionContext inspectionContext, DkmCompletionRoutine<DkmGetChildrenAsyncResult> completionRoutine)
{
var dataItem = evaluationResult.GetDataItem<EvalResultDataItem>();
if (dataItem == null)
{
// We don't know about this result. Call next implementation
evaluationResult.GetChildren(workList, initialRequestSize, inspectionContext, completionRoutine);
return;
}
var expansion = dataItem.Expansion;
if (expansion == null)
{
var enumContext = DkmEvaluationResultEnumContext.Create(0, evaluationResult.StackFrame, inspectionContext, new EnumContextDataItem(evaluationResult));
completionRoutine(new DkmGetChildrenAsyncResult(new DkmEvaluationResult[0], enumContext));
return;
}
// Evaluate children with InspectionContext that is not the root.
inspectionContext = inspectionContext.With(NotRoot);
var rows = ArrayBuilder<EvalResult>.GetInstance();
int index = 0;
expansion.GetRows(this, rows, inspectionContext, dataItem, dataItem.Value, 0, initialRequestSize, visitAll: true, index: ref index);
var numRows = rows.Count;
Debug.Assert(index >= numRows);
Debug.Assert(initialRequestSize >= numRows);
var initialChildren = new DkmEvaluationResult[numRows];
CompletionRoutine<Exception> onException = e => completionRoutine(DkmGetChildrenAsyncResult.CreateErrorResult(e));
var wl = new WorkList(workList, onException);
wl.ContinueWith(() =>
GetEvaluationResultsAndContinue(evaluationResult, rows, initialChildren, 0, numRows, wl, inspectionContext,
() =>
wl.ContinueWith(
() =>
{
var enumContext = DkmEvaluationResultEnumContext.Create(index, evaluationResult.StackFrame, inspectionContext, new EnumContextDataItem(evaluationResult));
completionRoutine(new DkmGetChildrenAsyncResult(initialChildren, enumContext));
rows.Free();
}),
onException));
}
示例2: GetRows
internal override void GetRows(
ResultProvider resultProvider,
ArrayBuilder<EvalResult> rows,
DkmInspectionContext inspectionContext,
EvalResultDataItem parent,
DkmClrValue value,
int startIndex,
int count,
bool visitAll,
ref int index)
{
_expansion.GetRows(
resultProvider,
rows,
inspectionContext.With(ResultProvider.NoResults),
parent,
_proxyValue,
startIndex: startIndex,
count: count,
visitAll: visitAll,
index: ref index);
}