Quantcast
Channel: ASP.NET MVC / Web API / Web Pages
Viewing all articles
Browse latest Browse all 7925

Created Unassigned: [HelpPage]Do not display parameter info when action parameter is HttpRequestMessage [1060]

$
0
0
For the following action, we are currently displaying parameter info(attached an snapshot image) in help page:
```
public IEnumerable<string> Get(HttpRequestMessage request)
{
return new string[] { "value1", "value2" };
}
```

We should avoid displaying this information as from end user's perspective, it doesn't make sense.

We already do not show parameter info for parameter CancellationToken. We could add one more check for HttpRequestMessage too.

In "\Areas\HelpPage\Views\Help\DisplayTemplates\Parameters.cshtml":
```
// Don't show CancellationToken because it's a special parameter
if (!typeof(CancellationToken).IsAssignableFrom(parameter.ParameterDescriptor.ParameterType))
{
```

Viewing all articles
Browse latest Browse all 7925

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>