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));
        }
Exemple #2
0
        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, GetIndicesAsStrings(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,
                       canFavorite: false,
                       isFavorite: false,
                       supportsFavorites: true));
        }