本文整理汇总了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();
}
}
}
示例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);
}
}
}
示例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();
}
}
示例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);
}
}
}