Example #1
0
        /// <summary>
        /// Deploys and validates target web model.
        /// </summary>
        /// <param name="model"></param>
        public override void DeployWebModel(ModelNode model)
        {
            if (!WebUrls.Any())
            {
                throw new SPMeta2Exception("WebUrls is empty");
            }

            foreach (var webUrl in WebUrls)
            {
                ContainerTraceUtils.WriteLine(string.Format("[INF]    Running on web: [{0}]", webUrl));



                for (var provisionGeneration = 0;
                     provisionGeneration < ProvisionGenerationCount;
                     provisionGeneration++)
                {
                    WithO365Context(webUrl, context =>
                    {
                        if (EnableDefinitionProvision)
                        {
                            _provisionService.DeployModel(WebModelHost.FromClientContext(context), model);
                        }

                        if (EnableDefinitionValidation)
                        {
                            _validationService.DeployModel(WebModelHost.FromClientContext(context), model);
                        }
                    });
                }
            }
        }
Example #2
0
 /// <summary>
 /// 检查用户登录超时,跳转到登陆页面
 /// </summary>
 public void CheckMemberLoginStatus()
 {
     if (!WebUtility.VerifyMemberSession())
     {
         Response.Redirect(WebUrls.Login(HttpUtility.UrlEncode(Request.Url.AbsoluteUri, Encoding.UTF8)));
     }
 }
Example #3
0
        private void LoadEnvironmentConfig()
        {
            SiteUrls.Clear();
            SiteUrls.AddRange(RunnerEnvironmentUtils.GetEnvironmentVariables(EnvironmentConsts.O365_SiteUrls));

            WebUrls.Clear();
            WebUrls.AddRange(RunnerEnvironmentUtils.GetEnvironmentVariables(EnvironmentConsts.O365_WebUrls));
        }
        public async Task ConnectAsync(string mothershipName, Action onNameAssignedAction)
        {
            m_onNameAssignedAction   = onNameAssignedAction;
            m_deviceSocketConnection = await DeviceSocketConnection.CreateAsync(WebUrls.ClientSocketUrl(mothershipName));

            m_deviceSocketConnection.OnMessageReceived += M_deviceSocketConnection_OnMessageReceived;
            m_deviceSocketConnection.OnSocketClosed    += M_deviceSocketConnection_OnSocketClosed;
            m_deviceSocketConnection.RunReceiveLoop();
        }
Example #5
0
        private void LoadEnvironmentConfig()
        {
            WebApplicationUrls.Clear();
            WebApplicationUrls.AddRange(RunnerEnvironmentUtils.GetEnvironmentVariables(EnvironmentConsts.SSOM_WebApplicationUrls));

            SiteUrls.Clear();
            SiteUrls.AddRange(RunnerEnvironmentUtils.GetEnvironmentVariables(EnvironmentConsts.SSOM_SiteUrls));

            WebUrls.Clear();
            WebUrls.AddRange(RunnerEnvironmentUtils.GetEnvironmentVariables(EnvironmentConsts.SSOM_WebUrls));
        }
Example #6
0
 public bool IsWeb(string rootUrl)
 {
     return(WebUrls != null && WebUrls.Contains(rootUrl));
 }
Example #7
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            var versionId = WebUrls.RefreshResourceVwersion();

            this.Label1.Text = string.Format("当前版本:{0}", versionId);
        }
        public void ProcessRequest(HttpContext context)
        {
            var queryData = context.Request.QueryString;
            var formData  = context.Request.Form;
            var postData  = new StringBuilder();
            var getData   = new StringBuilder();

            foreach (string formKey in formData)
            {
                postData.AppendFormat("&{0}={1}", formKey, formData[formKey]);
            }
            foreach (string getKey in queryData)
            {
                getData.AppendFormat("&{0}={1}", getKey, queryData[getKey]);
            }
            if (postData.Length > 0)
            {
                postData.Remove(0, 1);
            }
            else
            {
                postData.Append("null");
            }
            if (getData.Length > 0)
            {
                getData.Remove(0, 1);
            }
            else
            {
                getData.Append("null");
            }

            var queryUrl = BaseApi.ApiUrlDict.ContainsKey("Order.orderpayment_success")
                          ? BaseApi.ApiUrlDict["Order.orderpayment_success"]
                          : "";

            queryUrl += string.Format("/{0}/{1}/{2}/{3}/{4}/{5}/{6}",
                                      MConfigUtility.Get("SystemType"),
                                      "null",
                                      "null",
                                      "null",
                                      "null",
                                      HttpUtility.UrlEncodeUnicode(getData.ToString()),
                                      HttpUtility.UrlEncodeUnicode(postData.ToString()));
            var uri = new Uri(queryUrl);

            var resultJson = WebUtility.InvokeRestApi(new InvokeParmeter()
            {
                Uri    = uri,
                Method = Core.Enums.MMethodType.GET
            });
            var jobj = JObject.Parse(resultJson);

            if (jobj.Value <int>("status") == 1)
            {
                var orderCode = jobj.Value <string>("info");
                context.Response.Redirect(WebUrls.orderdetail(orderCode));
            }
            else
            {
                context.Response.Write("参数错误!");
            }
        }