예제 #1
0
 static void Main(string[] args)
 {
     var storage = XmlStorage.GetStorage("iekru", "dwl");
     var infos   = storage.Enum().Select(u => new DataInfo(u, storage.ReadByUrl <string>(u)));
     var metric  = new MaxContentNodes(infos);
     var nodes   = metric.GetNodes();
 }
예제 #2
0
        private static void DownloadSite()
        {
            var storage = XmlStorage.GetStorage("iekru", "dwl");

            /*var loader = new DomainLoader(new WebClientFactory(), storage, "https://www.iek.ru");
             * var task = loader.Download();
             * task.Wait();
             * var results = loader.GetResults();
             * File.WriteAllLines("result.txt", results.Where(x => x.Value != null).Select(x => $"{x.Key} - {x.Value?.ToString()}"));*/
            storage.Deduplication();
        }
예제 #3
0
 public void GetStorage()
 {
     Assert.Throws <ArgumentException>(() => XmlStorage.GetStorage("", "ext"));
     Assert.DoesNotThrow(() => XmlStorage.GetStorage("testpath", "ext"));
     Assert.NotNull(XmlStorage.GetStorage("testpath", "ext"));
 }