Example #1
0
        private static ResultsViewExpansion CreateExpansion(
            DkmInspectionContext inspectionContext,
            DkmClrValue value,
            DkmClrType enumerableType,
            ResultProvider resultProvider
            )
        {
            var proxyValue = value.InstantiateResultsViewProxy(inspectionContext, enumerableType);

            // InstantiateResultsViewProxy may return null (if required assembly is missing, for instance).
            if (proxyValue == null)
            {
                return(null);
            }

            var proxyMembers = MemberExpansion.CreateExpansion(
                inspectionContext,
                new TypeAndCustomInfo(proxyValue.Type),
                proxyValue,
                flags: ExpansionFlags.None,
                predicate: TypeHelpers.IsPublic,
                resultProvider: resultProvider,
                isProxyType: false,
                supportsFavorites: false
                );

            return(new ResultsViewExpansion(proxyValue, proxyMembers));
        }
        private static ResultsViewExpansion CreateExpansion(DkmClrValue value, DkmClrType enumerableType, Formatter formatter)
        {
            var proxyValue = value.InstantiateResultsViewProxy(enumerableType);

            // InstantiateResultsViewProxy may return null
            // (if assembly is missing for instance).
            if (proxyValue == null)
            {
                return(null);
            }

            var proxyMembers = MemberExpansion.CreateExpansion(
                proxyValue.Type.GetLmrType(),
                proxyValue,
                ExpansionFlags.None,
                TypeHelpers.IsPublic,
                formatter);

            return(new ResultsViewExpansion(proxyValue, proxyMembers));
        }
Example #3
0
        private static ResultsViewExpansion CreateExpansion(DkmInspectionContext inspectionContext, DkmClrValue value, DkmClrType enumerableType, Formatter formatter)
        {
            var proxyValue = value.InstantiateResultsViewProxy(inspectionContext, enumerableType);

            // InstantiateResultsViewProxy may return null
            // (if assembly is missing for instance).
            if (proxyValue == null)
            {
                return(null);
            }

            var proxyMembers = MemberExpansion.CreateExpansion(
                inspectionContext,
                new TypeAndCustomInfo(proxyValue.Type),
                proxyValue,
                flags: ExpansionFlags.None,
                predicate: TypeHelpers.IsPublic,
                formatter: formatter);

            return(new ResultsViewExpansion(proxyValue, proxyMembers));
        }