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(); }
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(); }
public void GetStorage() { Assert.Throws <ArgumentException>(() => XmlStorage.GetStorage("", "ext")); Assert.DoesNotThrow(() => XmlStorage.GetStorage("testpath", "ext")); Assert.NotNull(XmlStorage.GetStorage("testpath", "ext")); }