コード例 #1
0
        public List <ServerDomainData> GetDomains(IDaoFactory daoFactory)
        {
            var serverDomainDao = daoFactory.CreateServerDomainDao(Tenant);

            var listDomains = serverDomainDao.GetDomains();

            if (!listDomains.Any())
            {
                return(new List <ServerDomainData>());
            }

            var serverDnsDao = daoFactory.CreateServerDnsDao(Tenant, User);

            var list = new List <ServerDomainData>();

            foreach (var domain in listDomains)
            {
                var dnsData = UpdateDnsStatus(domain, serverDnsDao, serverDomainDao);

                var serverDomain = ToServerDomainData(domain, dnsData);

                list.Add(serverDomain);
            }

            return(list);
        }