Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

HelpPageApiModel.cs 1.5KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. using System.Collections.Generic;
  2. using System.Collections.ObjectModel;
  3. using System.Net.Http.Headers;
  4. using System.Web.Http.Description;
  5. namespace WebAPiUtils_test.Areas.HelpPage.Models
  6. {
  7. /// <summary>
  8. /// The model that represents an API displayed on the help page.
  9. /// </summary>
  10. public class HelpPageApiModel
  11. {
  12. /// <summary>
  13. /// Initializes a new instance of the <see cref="HelpPageApiModel"/> class.
  14. /// </summary>
  15. public HelpPageApiModel()
  16. {
  17. SampleRequests = new Dictionary<MediaTypeHeaderValue, object>();
  18. SampleResponses = new Dictionary<MediaTypeHeaderValue, object>();
  19. ErrorMessages = new Collection<string>();
  20. }
  21. /// <summary>
  22. /// Gets or sets the <see cref="ApiDescription"/> that describes the API.
  23. /// </summary>
  24. public ApiDescription ApiDescription { get; set; }
  25. /// <summary>
  26. /// Gets the sample requests associated with the API.
  27. /// </summary>
  28. public IDictionary<MediaTypeHeaderValue, object> SampleRequests { get; private set; }
  29. /// <summary>
  30. /// Gets the sample responses associated with the API.
  31. /// </summary>
  32. public IDictionary<MediaTypeHeaderValue, object> SampleResponses { get; private set; }
  33. /// <summary>
  34. /// Gets the error messages associated with this model.
  35. /// </summary>
  36. public Collection<string> ErrorMessages { get; private set; }
  37. }
  38. }