| | |
| | | using System; |
| | | using System.Web.Http; |
| | | using System.Web.Mvc; |
| | | using YwUser.Web.SysApi.Areas.HelpPage.ModelDescriptions; |
| | | using YwUser.Web.SysApi.Areas.HelpPage.Models; |
| | | using IStation.WebApi.Areas.HelpPage.ModelDescriptions; |
| | | using IStation.WebApi.Areas.HelpPage.Models; |
| | | |
| | | namespace YwUser.Web.SysApi.Areas.HelpPage.Controllers |
| | | namespace IStation.WebApi.Areas.HelpPage.Controllers |
| | | { |
| | | /// <summary> |
| | | /// The controller that will handle requests for the help page. |
| | |
| | | public class HelpController : Controller |
| | | { |
| | | private const string ErrorViewName = "Error"; |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | |
| | | public HelpController() |
| | | : this(GlobalConfiguration.Configuration) |
| | | { |
| | | } |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | /// <param name="config"></param> |
| | | |
| | | public HelpController(HttpConfiguration config) |
| | | { |
| | | Configuration = config; |
| | | } |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | |
| | | public HttpConfiguration Configuration { get; private set; } |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | |
| | | public ActionResult Index() |
| | | { |
| | | ViewBag.DocumentationProvider = Configuration.Services.GetDocumentationProvider(); |
| | | return View(Configuration.Services.GetApiExplorer().ApiDescriptions); |
| | | } |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | /// <param name="apiId"></param> |
| | | /// <returns></returns> |
| | | |
| | | public ActionResult Api(string apiId) |
| | | { |
| | | if (!String.IsNullOrEmpty(apiId)) |
| | |
| | | |
| | | return View(ErrorViewName); |
| | | } |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | /// <param name="modelName"></param> |
| | | /// <returns></returns> |
| | | |
| | | public ActionResult ResourceModel(string modelName) |
| | | { |
| | | if (!String.IsNullOrEmpty(modelName)) |