当前位置: 首页>>代码示例>>C#>>正文


C# Request.GetParametersString方法代码示例

本文整理汇总了C#中IronWASP.Request.GetParametersString方法的典型用法代码示例。如果您正苦于以下问题:C# Request.GetParametersString方法的具体用法?C# Request.GetParametersString怎么用?C# Request.GetParametersString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在IronWASP.Request的用法示例。


在下文中一共展示了Request.GetParametersString方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: LogMTRequest

 internal static void LogMTRequest(Request Request)
 {
     using (SQLiteConnection MT_DB = new SQLiteConnection("data source=" + TestLogFile))
     {
         MT_DB.Open();
         using (SQLiteCommand Cmd = MT_DB.CreateCommand())
         {
             Cmd.CommandText = "INSERT INTO TestLog (ID, SSL, HostName, Method, URL, File, Parameters, RequestHeaders, RequestBody, BinaryRequest, Notes) VALUES (@ID, @SSL, @HostName, @Method, @URL, @File, @Parameters, @RequestHeaders, @RequestBody, @BinaryRequest, @Notes)";
             Cmd.Parameters.AddWithValue("@ID", Request.ID);
             Cmd.Parameters.AddWithValue("@SSL", AsInt(Request.SSL));
             Cmd.Parameters.AddWithValue("@HostName", Request.Host);
             Cmd.Parameters.AddWithValue("@Method", Request.Method);
             Cmd.Parameters.AddWithValue("@URL", Request.URL);
             Cmd.Parameters.AddWithValue("@File", Request.File);
             Cmd.Parameters.AddWithValue("@Parameters", Request.GetParametersString());
             //Cmd.Parameters.AddWithValue("@RequestHeaders", Request.GetHeadersAsStringWithoutFullURL());
             Cmd.Parameters.AddWithValue("@RequestHeaders", Request.GetHeadersAsString());
             if (Request.IsBinary)
                 Cmd.Parameters.AddWithValue("@RequestBody", Request.BinaryBodyString);
             else
                 Cmd.Parameters.AddWithValue("@RequestBody", Request.BodyString);
             //Cmd.Parameters.AddWithValue("@RequestBody", Request.BodyString);
             Cmd.Parameters.AddWithValue("@BinaryRequest", AsInt(Request.IsBinary));
             Cmd.Parameters.AddWithValue("@Notes", "Some Notes");
             Cmd.ExecuteNonQuery();
         }
     }
 }
开发者ID:0ks3ii,项目名称:IronWASP,代码行数:28,代码来源:IronDB.cs

示例2: UpdateEditedProxyLogRequestEntry

        internal static void UpdateEditedProxyLogRequestEntry(Request Req)
        {
            if (UI.ProxyLogGrid.InvokeRequired)
            {
                UpdateEditedProxyLogRequestEntry_d UEPLRE_d = new UpdateEditedProxyLogRequestEntry_d(UpdateEditedProxyLogRequestEntry);
                UI.Invoke(UEPLRE_d, new object[] { Req });
            }
            else
            {
                try
                {
                    int GridID = 0;
                    if (IronUpdater.ProxyGridMap.ContainsKey(Req.ID))
                    {
                        GridID = IronUpdater.ProxyGridMap[Req.ID];
                    }
                    if (!((int)UI.ProxyLogGrid.Rows[GridID].Cells["ProxyLogGridColumnForID"].Value == Req.ID))
                    {
                        foreach (DataGridViewRow Row in UI.ProxyLogGrid.Rows)
                        {
                            if ((int)Row.Cells["ProxyLogGridColumnForID"].Value == Req.ID)
                            {
                                GridID = Row.Index;
                                break;
                            }
                        }
                    }

                    UI.ProxyLogGrid.Rows[GridID].Cells["ProxyLogGridColumnForMethod"].Value = Req.Method;
                    UI.ProxyLogGrid.Rows[GridID].Cells["ProxyLogGridColumnForURL"].Value = Req.URL;
                    UI.ProxyLogGrid.Rows[GridID].Cells["ProxyLogGridColumnForFile"].Value = Req.File;
                    UI.ProxyLogGrid.Rows[GridID].Cells["ProxyLogGridColumnForParameters"].Value = Req.GetParametersString();
                    UI.ProxyLogGrid.Rows[GridID].Cells["ProxyLogGridColumnForEdited"].Value = true;
                    UI.ProxyLogGrid.Rows[GridID].Visible = IronProxy.CanDisplayRowInLogDisplay(Req.Method, Req.Host, Req.StoredFile, 0, null, false);
                }
                catch (Exception Exp)
                {
                    IronException.Report("Error updating Edited Proxy Request in UI", Exp.Message, Exp.StackTrace);
                }
            }
        }
开发者ID:herotheo,项目名称:IronWASP,代码行数:41,代码来源:IronUI.cs

示例3: UpdateMTLogGridWithRequest

 internal static void UpdateMTLogGridWithRequest(Request Req)
 {
     if (UI.TestLogGrid.InvokeRequired)
     {
         UpdateMTLogGridWithRequest_d UMTLGWR_d = new UpdateMTLogGridWithRequest_d(UpdateMTLogGridWithRequest);
         UI.Invoke(UMTLGWR_d, new object[] { Req });
     }
     else
     {
         if (UI.TestLogGrid.Rows.Count > IronLog.MaxRowCount) return;
         try
         {
             int GridID = UI.TestLogGrid.Rows.Add(new object[] { Req.ID, Req.Host, Req.Method, Req.URL, Req.File, Req.SSL, Req.GetParametersString() });
             IronUpdater.MTGridMap.Add(Req.ID, GridID);
             if (Req.ID > IronLog.TestMax) IronLog.TestMax = Req.ID;
             if (Req.ID < IronLog.TestMin || IronLog.TestMin < 1) IronLog.TestMin = Req.ID;
         }
         catch(Exception Exp)
         {
             IronException.Report("Error Updating MT Grid with Request", Exp.Message, Exp.StackTrace);
         }
         ShowCurrentLogStat();
     }
 }
开发者ID:herotheo,项目名称:IronWASP,代码行数:24,代码来源:IronUI.cs

示例4: UpdateMTLogGridWithRequest

 internal static void UpdateMTLogGridWithRequest(Request Req)
 {
     if (UI.TestLogGrid.InvokeRequired)
     {
         UpdateMTLogGridWithRequest_d UMTLGWR_d = new UpdateMTLogGridWithRequest_d(UpdateMTLogGridWithRequest);
         UI.Invoke(UMTLGWR_d, new object[] { Req });
     }
     else
     {
         try
         {
             int GridID = UI.TestLogGrid.Rows.Add(new object[] { Req.ID, Req.Host, Req.Method, Req.URL, Req.File, Req.SSL, Req.GetParametersString() });
             IronUpdater.MTGridMap.Add(Req.ID, GridID);
         }
         catch(Exception Exp)
         {
             IronException.Report("Error Updating MT Grid with Request", Exp.Message, Exp.StackTrace);
         }
     }
 }
开发者ID:welias,项目名称:IronWASP,代码行数:20,代码来源:IronUI.cs


注:本文中的IronWASP.Request.GetParametersString方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。