private static string GetAuthUrl(int tenantId)
        {
            var tenantResource = new TenantResource();
            var tenant         = tenantResource.GetTenant(tenantId);

            return(HttpHelper.GetUrl(tenant.Domain));
        }
示例#2
0
        private static Site GetSite(int tenantId, int siteId)
        {
            var tenantResource = new TenantResource();
            var tenant         = tenantResource.GetTenant(tenantId);
            var site           = tenant.Sites.SingleOrDefault(x => x.Id.Equals(siteId));

            if (site == null)
            {
                throw new Exception(string.Format("{0} not found for tenant {1}", siteId, tenantId));
            }
            return(site);
        }
示例#3
0
        public static Tenant GetTenant(int sandBoxId)
        {
            var tenantResource = new TenantResource();

            return(tenantResource.GetTenant(sandBoxId));
        }