Пример #1
0
        public virtual string[] GetSites()
        {
            List<string> sites = new List<string>();

            SiteAdmin stAdmin = new SiteAdmin();
            PrepareProxy(stAdmin);

            SiteInfoArrayResult result = stAdmin.GetAllSites(Username, Password, false);
            if (result.Sites == null)
                return sites.ToArray();

            foreach (SiteInfo site in result.Sites)
                sites.Add(site.DomainName);

            return sites.ToArray();
        }
Пример #2
0
        public virtual string GetSiteId(string siteName)
        {
            SiteAdmin stAdmin = new SiteAdmin();
            PrepareProxy(stAdmin);

            SiteInfoArrayResult result = stAdmin.GetAllSites(Username, Password, false);
            if (result.Sites == null)
                return null;

            foreach (SiteInfo site in result.Sites)
            {
                if (String.Compare(siteName, site.DomainName, 0) == 0)
                    return site.SiteID.ToString();
            }

            return null;
        }