async Task <IListDebugPropertyInfo> GetPropertiesInfoAsync()
        {
            var propertyInfos = new DEBUG_PROPERTY_INFO[_requestedCount];
            int returned      =
                await _childrenProvider.GetChildrenAsync(_fromIndex, _requestedCount,
                                                         propertyInfos);

            return(new ListDebugPropertyInfo(propertyInfos.Take(returned).ToArray()));
        }
예제 #2
0
        private IPropertyInfo[] GetChildren(IDebugProperty2 debugProperty, IExpandablePropertyInfo parent)
        {
            var logger = Logger.GetLogger();

            logger.Info("EnumChildren");

            IEnumDebugPropertyInfo2 debugPropertyEnum;

            debugProperty.EnumChildren(
                enum_DEBUGPROP_INFO_FLAGS.DEBUGPROP_INFO_STANDARD | enum_DEBUGPROP_INFO_FLAGS.DEBUGPROP_INFO_FULLNAME,
                10,
                dbgGuids.guidFilterLocals,
                enum_DBG_ATTRIB_FLAGS.DBG_ATTRIB_ALL,
                "",
                Configuration.DefaultTimeoutForVSCalls,
                out debugPropertyEnum).ThrowOnFailure();

            uint count;

            debugPropertyEnum.GetCount(out count).ThrowOnFailure();
            DEBUG_PROPERTY_INFO[] debugPropInfos = new DEBUG_PROPERTY_INFO[ITEMS_TO_FETCH];
            uint fetched;

            logger.Info($"Fetch children");

            List <IPropertyInfo> result = new List <IPropertyInfo>();

            do
            {
                // TODO: Performance bottlneck
                debugPropertyEnum.Next(ITEMS_TO_FETCH, debugPropInfos, out fetched).ThrowOnFailure();

                logger.Info("Received next {0} of children", ITEMS_TO_FETCH);
                foreach (var p in debugPropInfos.Take((int)fetched))
                {
                    // this properties are not evaluated
                    var child = _propertyInfoFactory.Create(p, parent);
                    logger.Info("Returning property: '{0}'", child.Name);
                    result.Add(child);
                }
            } while (fetched >= ITEMS_TO_FETCH);

            logger.Info("All children returned");
            return(result.ToArray());
        }
예제 #3
0
        async Task <IListDebugPropertyInfo> GetPropertiesInfoAsync()
        {
            ICollection <IVariableInformation> varInfos = _frameVariablesProvider.Get(_guidFilter);

            if (varInfos == null)
            {
                return(null);
            }

            var childrenProvider = _childrenProviderFactory.Create(
                new ListChildAdapter.Factory().Create(varInfos.ToList()), _fields, _radix);

            var propertyInfos = new DEBUG_PROPERTY_INFO[varInfos.Count];
            int returned      = await childrenProvider.GetChildrenAsync(
                0, varInfos.Count, propertyInfos);

            return(new ListDebugPropertyInfo(propertyInfos.Take(returned).ToArray()));
        }