コード例 #1
0
        public void TestComObjectCollector()
        {
            if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
            {
                var coc = new ComObjectCollector(new CollectCommandOptions());
                coc.TryExecute();

                Assert.IsTrue(coc.Results.Any(x => x is ComObject y && y.x86_Binary != null));
            }
        }
コード例 #2
0
        public void TestComObjectCollector()
        {
            if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
            {
                var coc = new ComObjectCollector(new CollectCommandOptions());
                coc.TryExecute();

                Assert.IsTrue(coc.Results.Any(x => x is ComObject y && y.x86_Binary != null));

                ConcurrentStack <CollectObject> results = new ConcurrentStack <CollectObject>();
                coc = new ComObjectCollector(changeHandler: x => results.Push(x));
                coc.TryExecute();

                Assert.IsTrue(results.Any(x => x is ComObject y && y.x86_Binary != null));
            }
        }