本文整理汇总了C#中Microsoft.VisualStudio.Debugger.Evaluation.ClrCompilation.DkmClrValue.GetArrayElement方法的典型用法代码示例。如果您正苦于以下问题:C# DkmClrValue.GetArrayElement方法的具体用法?C# DkmClrValue.GetArrayElement怎么用?C# DkmClrValue.GetArrayElement使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Microsoft.VisualStudio.Debugger.Evaluation.ClrCompilation.DkmClrValue
的用法示例。
在下文中一共展示了DkmClrValue.GetArrayElement方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetRow
private EvalResult GetRow(
ResultProvider resultProvider,
DkmInspectionContext inspectionContext,
DkmClrValue value,
int index,
EvalResultDataItem parent)
{
var indices = GetIndices(index);
var fullNameProvider = resultProvider.FullNameProvider;
var name = fullNameProvider.GetClrArrayIndexExpression(inspectionContext, indices);
var element = value.GetArrayElement(indices, inspectionContext);
var fullName = GetFullName(inspectionContext, parent, name, fullNameProvider);
return resultProvider.CreateDataItem(
inspectionContext,
name,
typeDeclaringMemberAndInfo: default(TypeAndCustomInfo),
declaredTypeAndInfo: _elementTypeAndInfo,
value: element,
useDebuggerDisplay: parent != null,
expansionFlags: ExpansionFlags.IncludeBaseMembers,
childShouldParenthesize: false,
fullName: fullName,
formatSpecifiers: Formatter.NoFormatSpecifiers,
category: DkmEvaluationResultCategory.Other,
flags: element.EvalFlags,
evalFlags: inspectionContext.EvaluationFlags);
}
示例2: GetRow
private DkmEvaluationResult GetRow(
ResultProvider resultProvider,
DkmInspectionContext inspectionContext,
DkmClrValue value,
int index,
EvalResultDataItem parent)
{
var indices = GetIndices(index);
var formatter = resultProvider.Formatter;
var name = formatter.GetArrayIndexExpression(indices);
var elementType = value.Type.ElementType;
var element = value.GetArrayElement(indices);
var fullName = GetFullName(parent, name, formatter);
var dataItem = resultProvider.CreateDataItem(
inspectionContext,
name,
typeDeclaringMember: null,
declaredType: elementType.GetLmrType(),
value: element,
parent: parent,
expansionFlags: ExpansionFlags.IncludeBaseMembers,
childShouldParenthesize: false,
fullName: fullName,
formatSpecifiers: Formatter.NoFormatSpecifiers,
category: DkmEvaluationResultCategory.Other,
flags: element.EvalFlags,
evalFlags: inspectionContext.EvaluationFlags);
return resultProvider.GetResult(dataItem, element.Type, elementType, parent);
}