public override IWebDomain GetWebDomain(int domainId, IMailServerFactory factory) { if (domainId < 0) { throw new ArgumentException("domain_id has negative value", "domainId"); } if (factory == null) { throw new ArgumentNullException("factory"); } var domainDto = TeamlabDomainDal.GetDomain(domainId); if (domainDto == null) { throw new Exception("Domain is missing"); } var domainBase = _GetWebDomain(domainDto.name); if (domainBase == null) { throw new Exception("Server domain is missing"); } var webdomain = factory.CreateWebDomain(domainDto.id, domainDto.tenant, domainDto.name, domainDto.is_virified, this); return(webdomain); }
public override bool IsDomainExists(string name) { var domain = TeamlabDomainDal.GetDomain(name); return(domain != null); }