Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Net.Http.Headers;
  4. using System.Web;
  5. using System.Web.Http;
  6. namespace WebAPiUtils_test.Areas.HelpPage
  7. {
  8. /// <summary>
  9. /// Use this class to customize the Help Page.
  10. /// For example you can set a custom <see cref="System.Web.Http.Description.IDocumentationProvider"/> to supply the documentation
  11. /// or you can provide the samples for the requests/responses.
  12. /// </summary>
  13. public static class HelpPageConfig
  14. {
  15. public static void Register(HttpConfiguration config)
  16. {
  17. //// Uncomment the following to use the documentation from XML documentation file.
  18. //config.SetDocumentationProvider(new XmlDocumentationProvider(HttpContext.Current.Server.MapPath("~/App_Data/XmlDocument.xml")));
  19. //// Uncomment the following to use "sample string" as the sample for all actions that have string as the body parameter or return type.
  20. //// Also, the string arrays will be used for IEnumerable<string>. The sample objects will be serialized into different media type
  21. //// formats by the available formatters.
  22. //config.SetSampleObjects(new Dictionary<Type, object>
  23. //{
  24. // {typeof(string), "sample string"},
  25. // {typeof(IEnumerable<string>), new string[]{"sample 1", "sample 2"}}
  26. //});
  27. //// Uncomment the following to use "[0]=foo&[1]=bar" directly as the sample for all actions that support form URL encoded format
  28. //// and have IEnumerable<string> as the body parameter or return type.
  29. //config.SetSampleForType("[0]=foo&[1]=bar", new MediaTypeHeaderValue("application/x-www-form-urlencoded"), typeof(IEnumerable<string>));
  30. //// Uncomment the following to use "1234" directly as the request sample for media type "text/plain" on the controller named "Values"
  31. //// and action named "Put".
  32. //config.SetSampleRequest("1234", new MediaTypeHeaderValue("text/plain"), "Values", "Put");
  33. //// Uncomment the following to use the image on "../images/aspNetHome.png" directly as the response sample for media type "image/png"
  34. //// on the controller named "Values" and action named "Get" with parameter "id".
  35. //config.SetSampleResponse(new ImageSample("../images/aspNetHome.png"), new MediaTypeHeaderValue("image/png"), "Values", "Get", "id");
  36. //// Uncomment the following to correct the sample request when the action expects an HttpRequestMessage with ObjectContent<string>.
  37. //// The sample will be generated as if the controller named "Values" and action named "Get" were having string as the body parameter.
  38. //config.SetActualRequestType(typeof(string), "Values", "Get");
  39. //// Uncomment the following to correct the sample response when the action returns an HttpResponseMessage with ObjectContent<string>.
  40. //// The sample will be generated as if the controller named "Values" and action named "Post" were returning a string.
  41. //config.SetActualResponseType(typeof(string), "Values", "Post");
  42. }
  43. }
  44. }