You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Parameters.cshtml 1.7KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. @using System.Collections.ObjectModel
  2. @using System.Web.Http.Description
  3. @using System.Threading
  4. @model Collection<ApiParameterDescription>
  5. <table class="help-page-table">
  6. <thead>
  7. <tr><th>Name</th><th>Description</th><th>Additional information</th></tr>
  8. </thead>
  9. <tbody>
  10. @foreach (ApiParameterDescription parameter in Model)
  11. {
  12. string parameterDocumentation = parameter.Documentation != null ?
  13. parameter.Documentation :
  14. "No documentation available.";
  15. // Don't show CancellationToken because it's a special parameter
  16. if (parameter.ParameterDescriptor == null ||
  17. (parameter.ParameterDescriptor != null &&
  18. !typeof(CancellationToken).IsAssignableFrom(parameter.ParameterDescriptor.ParameterType)))
  19. {
  20. <tr>
  21. <td class="parameter-name"><b>@parameter.Name</b></td>
  22. <td class="parameter-documentation"><pre>@parameterDocumentation</pre></td>
  23. <td class="parameter-source">
  24. @switch (parameter.Source)
  25. {
  26. case ApiParameterSource.FromBody:
  27. <p>Define this parameter in the request <b>body</b>.</p>
  28. break;
  29. case ApiParameterSource.FromUri:
  30. <p>Define this parameter in the request <b>URI</b>.</p>
  31. break;
  32. case ApiParameterSource.Unknown:
  33. default:
  34. <p>None.</p>
  35. break;
  36. }
  37. </td>
  38. </tr>
  39. }
  40. }
  41. </tbody>
  42. </table>