Add additional SystemWeb HttpRequset properties to C# test stubs

This commit is contained in:
ewillonermsft
2025-09-24 18:24:36 -07:00
committed by GitHub
parent 2db5f0def5
commit b2fc68ff81

View File

@@ -178,6 +178,37 @@ namespace System.Web
public string RawUrl { get; set; }
public HttpCookieCollection Cookies => null;
public bool IsAuthenticated { get; set; }
public NameValueCollection Form => null;
public NameValueCollection Headers => null;
public NameValueCollection Params => null;
public string UserAgent(string s) => null;
public string UrlReferrer(string s) => null;
public NameValueCollection ServerVariables => null;
// Default property that goes through the collections
// QueryString, Form, Cookies, ClientCertificate and ServerVariables
public String this[String key]
{
get
{
String s;
s = QueryString[key];
if (s != null)
return s;
s = Form[key];
if (s != null)
return s;
HttpCookie c = Cookies[key];
if (c != null)
return c.Value;
s = ServerVariables[key];
if (s != null)
return s;
}
}
}
public class HttpRequestWrapper : System.Web.HttpRequestBase