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)); } }
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)); } }