Ejemplo n.º 1
0
        public async Task GetChildrenReturnsChildrenInTheRequestedRangeAsync()
        {
            var childAdapter = new ListChildAdapter.Factory().Create(_allChildren);

            CollectionAssert.AreEqual(new[] { "child1", "child2" },
                                      await GetChildNamesAsync(childAdapter, 0, 2));

            CollectionAssert.AreEqual(new[] { "child2", "child3" },
                                      await GetChildNamesAsync(childAdapter, 1, 5));

            CollectionAssert.AreEqual(new[] { "child1", "child2", "child3" },
                                      await GetAllChildNamesAsync(childAdapter));
        }
Ejemplo n.º 2
0
        public int EnumPropertiesImpl(enum_DEBUGPROP_INFO_FLAGS fields, uint radix, Guid guidFilter,
                                      uint timeout, out uint count,
                                      out IEnumDebugPropertyInfo2 propertyEnum)
        {
            var frameVariablesProvider = new FrameVariablesProvider(registerSetsBuilder, lldbFrame,
                                                                    varInfoFactory);

            ICollection <IVariableInformation> varInfos = frameVariablesProvider.Get(guidFilter);

            if (varInfos == null)
            {
                count        = 0;
                propertyEnum = null;
                return(VSConstants.E_NOTIMPL);
            }

            count = (uint)varInfos.Count;
            var childrenAdapter  = new ListChildAdapter.Factory().Create(varInfos.ToList());
            var childrenProvider = _childrenProviderFactory.Create(childrenAdapter, fields, radix);

            propertyEnum = varInfoEnumFactory.Create(childrenProvider);
            return(VSConstants.S_OK);
        }
Ejemplo n.º 3
0
        public async Task CountChildrenReturnsTheNumberOfChildrenAsync()
        {
            var childAdapter = new ListChildAdapter.Factory().Create(_allChildren);

            Assert.That(await childAdapter.CountChildrenAsync(), Is.EqualTo(_allChildren.Count));
        }