コード例 #1
0
        public void Start_ScanTestData_DicomDirFileFound()
        {
            var dicomdirFileFound = false;
            var complete          = false;

            var scanner = new DicomFileScanner();

            scanner.FileFound += (fileScanner, file, name) =>
            {
                if (name.EndsWith("DICOMDIR"))
                {
                    dicomdirFileFound = true;
                    complete          = true;
                }
            };
            scanner.Complete += fileScanner => complete = true;

            scanner.Start(@".");
            while (!complete)
            {
                Thread.Sleep(100);
            }
            scanner.Stop();

            Assert.True(dicomdirFileFound);
        }
コード例 #2
0
        public void Start_ScanTestData_DicomDirFileFound()
        {
            var dicomdirFileFound = false;
            var complete = false;

            var scanner = new DicomFileScanner();
            scanner.FileFound += (fileScanner, file, name) =>
                {
                    if (name.EndsWith("DICOMDIR")) dicomdirFileFound = true;
                    complete = true;
                };
            scanner.Complete += fileScanner => complete = true;

            scanner.Start(@".");
            while (!complete) Thread.Sleep(100);
            scanner.Stop();

            Assert.True(dicomdirFileFound);
        }