public void TestScanner() { DirScanner scanner = new DirScanner(); scanner.Scan(@"c:\usr\shared\", new string[] { "*.pdf" }, null); Assert.IsTrue(scanner.NewItems.Count > 0); scanner.Add(scanner.NewItems, "usr shared local", null); }
void ExecuteOK(object p) { string[] extensions = Extensions.Split(new[] { " " }, StringSplitOptions.RemoveEmptyEntries); WindowAsyncOperation.RunAsync(Properties.Resources.LabelCmdAdd, (ReportProgress progressReport) => { DirScanner scanner = new DirScanner(); scanner.Scan(Dir, extensions, progressReport); scanner.Add(scanner.NewItems, Tags, progressReport); }); RiseOnCloseRequired(CloseReason.OK); }