public void RefreshSomeDomain(CPanel cPanel, ProgressReporter reporter) { ProgressReporter.Coalesce(ref reporter); reporter.Report(0, "Domeny zaparkowane"); if (!parkedLoaded) { Parked = cPanel.Call_ParkedDomain_List(); } reporter.Report(33, "Domeny dodatkowe"); if (!addonLoaded) { Addon = cPanel.Call_AddonDomain_List(); } reporter.Report(66, "Subdomeny"); if (!subLoaded) { Sub = cPanel.Call_SubDomain_List(); } reporter.Report(75, "Domeny główne"); if (!rootLoaded) { SetRootDomainsFromAllDomainsIncludingRoot(cPanel); } reporter.Finish(); }
public RootDomain IncrementalDomainSearch(string domainName, bool forceReload, CPanel cPanel, ProgressReporter reporter) { ProgressReporter.Coalesce(ref reporter); reporter.Report(0, "Domeny zaparkowane"); if (!parkedLoaded || forceReload) { Parked = cPanel.Call_ParkedDomain_List(); } var f1 = Parked.Where(i => i.NameEquals(domainName)); if (f1.Any()) { return(f1.First()); } reporter.Report(33, "Domeny dodatkowe"); if (!addonLoaded || forceReload) { Addon = cPanel.Call_AddonDomain_List(); } var f2 = Addon.Where(i => i.NameEquals(domainName)); if (f2.Any()) { return(f2.First()); } reporter.Report(66, "Subdomeny"); if (!subLoaded || forceReload) { Sub = cPanel.Call_SubDomain_List(); } var f3 = Sub.Where(i => i.NameEquals(domainName)); if (f3.Any()) { return(f3.First()); } reporter.Report(75, "Domeny główne"); if (!rootLoaded || forceReload) { SetRootDomainsFromAllDomainsIncludingRoot(cPanel); //var allNoRoot = All; //var allWithRoot = cPanel.Call_DomainLookup_GetDocRoots(); // Root = DomainContainer.ComputeRootDomains(allNoRoot, allWithRoot); } var f4 = root.Where(i => i.NameEquals(domainName)); if (f4.Any()) { return(f4.First()); } reporter.Finish(); return(null); }