zoukankan      html  css  js  c++  java
  • Mvc api HelpPage 与注释

    一、添加包Microsoft.AspNet.WebApi.HelpPage可以自动给api生成帮助页面,url:/help

    二、help加注释:

    1.

    2.

    public static class HelpPageConfig
    {
    [SuppressMessage("Microsoft.Globalization", "CA1303:Do not pass literals as localized parameters",
    MessageId = "WebApplication2.Areas.HelpPage.TextSample.#ctor(System.String)",
    Justification = "End users may choose to merge this string with existing localized resources.")]
    [SuppressMessage("Microsoft.Naming", "CA2204:Literals should be spelled correctly",
    MessageId = "bsonspec",
    Justification = "Part of a URI.")]
    public static void Register(HttpConfiguration config)
    {
    //// Uncomment the following to use the documentation from XML documentation file.
    config.SetDocumentationProvider(new XmlDocumentationProvider(HttpContext.Current.Server.MapPath("~/bin/WebApplication2.XML")));

  • 相关阅读:
    websocket1
    webpack 入门三
    weboack 入门二
    webpack 入门一
    输入一个url发生了什么
    http详解
    JavaScript对象详解
    javaScript垃圾回收机制
    js数据类型与隐式类型转换
    iOS证书申请、AppStore上架流程
  • 原文地址:https://www.cnblogs.com/catzhou/p/5995804.html
Copyright © 2011-2022 走看看