Пример #1
0
        /// <summary>
        /// Gets a website instance.
        /// </summary>
        /// <param name="name">The website name</param>
        /// <returns>The website instance</returns>
        public Site GetWebsite(string name)
        {
            name = GetWebsiteName(name);
            Site website = WebsiteChannel.GetSiteWithCache(subscriptionId, name, null);

            if (website == null)
            {
                throw new Exception(string.Format(Resources.InvalidWebsite, name));
            }

            return(website);
        }
Пример #2
0
        private Repository TryGetRepository(string websiteName)
        {
            Site site = WebsiteChannel.GetSiteWithCache(
                subscriptionId,
                websiteName,
                "repositoryuri,publishingpassword,publishingusername");

            if (site != null)
            {
                return(new Repository(site));
            }

            return(null);
        }
Пример #3
0
        private Repository GetRepository(string websiteName)
        {
            Site site = WebsiteChannel.GetSiteWithCache(
                subscriptionId,
                websiteName,
                "repositoryuri,publishingpassword,publishingusername");

            if (site != null)
            {
                return(new Repository(site));
            }

            throw new Exception(Resources.RepositoryNotSetup);
        }