所以我有以下代码:
public override void Extract(object sender, ExtractionEventArgs e)
{
if (e.Response.HtmlDocument != null)
{
var myParam = e.Request.QueryStringParameters.Where(parameter => parameter.Name == QueryName).Select(parameter => parameter.Value).Distinct();
myParam.
// add the extracted value to the web performance test context
e.WebTest.Context.Add(this.ContextParameterName, myParam.ToString());
e.Success = true;
return;
}
// If the extraction fails, set the error text that the user sees
e.Success = false;
e.Message = String.Format(CultureInfo.CurrentCulture, "Not Found: {0}", QueryName);
}
它回来了:
System.Linq.Enumerable+<DistinctItem>d_81`1[system.string]
我期待以下内容:
0152-1231-1231-123d
我的问题是如何从extractioneventargs
. 他们说有可能,但我不知道。