增加注释:添加所有类注释,移除xml警告信息

This commit is contained in:
Argo-MacBookPro 2018-10-28 15:08:58 +08:00
parent 32bd9d2aa3
commit 81fce99357
17 changed files with 81 additions and 10 deletions

View File

@ -5,11 +5,14 @@ using System.Collections.Generic;
namespace Bootstrap.Admin.Controllers.Api
{
/// <summary>
/// 数据字典分类
/// </summary>
[Route("api/[controller]")]
public class CategoryController : Controller
{
/// <summary>
///
/// 获取字典表中所有Category数据
/// </summary>
/// <returns></returns>
[HttpGet]

View File

@ -67,9 +67,14 @@ namespace Bootstrap.Admin.Controllers.Api
}
return new JsonResult(sb.ToString());
}
/// <summary>
///
/// </summary>
public class ExceptionFileQuery
{
/// <summary>
///
/// </summary>
public string FileName { get; set; }
}
}

View File

@ -32,7 +32,11 @@ namespace Bootstrap.Admin.Controllers.Api
{
return LogHelper.RetrieveLogs().FirstOrDefault(t => t.Id == id);
}
/// <summary>
///
/// </summary>
/// <param name="value"></param>
/// <returns></returns>
[HttpPost]
public bool Post([FromBody]Log value)
{

View File

@ -14,6 +14,12 @@ namespace Bootstrap.Admin.Controllers.Api
[Route("api/[controller]")]
public class ProfilesController : Controller
{
/// <summary>
///
/// </summary>
/// <param name="env"></param>
/// <param name="files"></param>
/// <returns></returns>
[HttpPost]
public async Task<JsonResult> Post([FromServices]IHostingEnvironment env, IFormCollection files)
{

View File

@ -8,6 +8,9 @@ using System.Threading.Tasks;
namespace Bootstrap.Admin.Controllers.Api
{
/// <summary>
/// 注册用户操作类
/// </summary>
[AllowAnonymous]
[Route("api/[controller]")]
public class RegisterController : Controller
@ -15,7 +18,7 @@ namespace Bootstrap.Admin.Controllers.Api
/// <summary>
/// 登录页面注册新用户remote validate调用
/// </summary>
/// <param name="value"></param>
/// <param name="userName"></param>
/// <returns></returns>
[HttpGet]
public bool Get(string userName)
@ -25,6 +28,7 @@ namespace Bootstrap.Admin.Controllers.Api
/// <summary>
/// 登录页面注册新用户提交按钮调用
/// </summary>
/// <param name="hub"></param>
/// <param name="user"></param>
/// <returns></returns>
[HttpPost]

View File

@ -26,7 +26,6 @@ namespace Bootstrap.Admin.Controllers.Api
/// <summary>
///
/// </summary>
/// <param name="value"></param>
[HttpGet]
public IEnumerable<ICacheCorsItem> Get()
{

View File

@ -8,6 +8,10 @@ namespace Bootstrap.Admin.Models
/// </summary>
public class HeaderBarModel : ModelBase
{
/// <summary>
///
/// </summary>
/// <param name="identity"></param>
public HeaderBarModel(IIdentity identity)
{
var user = UserHelper.RetrieveUserByUserName(identity.Name);
@ -16,6 +20,9 @@ namespace Bootstrap.Admin.Models
UserName = user.UserName;
if (!string.IsNullOrEmpty(user.Css)) Theme = user.Css;
}
/// <summary>
///
/// </summary>
public string UserName { get; }
/// <summary>
///

View File

@ -5,8 +5,15 @@ using System.Collections.Generic;
namespace Bootstrap.Admin.Models
{
/// <summary>
///
/// </summary>
public class NavigatorBarModel : HeaderBarModel
{
/// <summary>
///
/// </summary>
/// <param name="controller"></param>
public NavigatorBarModel(ControllerBase controller) : base(controller.User.Identity)
{
Navigations = MenuHelper.RetrieveSystemMenus(UserName, $"~{controller.HttpContext.Request.Path}");

View File

@ -3,13 +3,24 @@ using Microsoft.AspNetCore.Hosting;
namespace Bootstrap.Admin
{
/// <summary>
///
/// </summary>
public class Program
{
/// <summary>
///
/// </summary>
/// <param name="args"></param>
public static void Main(string[] args)
{
CreateWebHostBuilder(args).Build().Run();
}
/// <summary>
///
/// </summary>
/// <param name="args"></param>
/// <returns></returns>
public static IWebHostBuilder CreateWebHostBuilder(string[] args) =>
WebHost.CreateDefaultBuilder(args).UseStartup<Startup>();
}

View File

@ -5,6 +5,9 @@ using System.Linq;
namespace Bootstrap.Admin.Query
{
/// <summary>
///
/// </summary>
public class QueryDictOption : PaginationOption
{
/// <summary>

View File

@ -5,6 +5,9 @@ using System.Linq;
namespace Bootstrap.Admin.Query
{
/// <summary>
///
/// </summary>
public class QueryExceptionOption : PaginationOption
{
/// <summary>

View File

@ -4,6 +4,9 @@ using System.Linq;
namespace Bootstrap.Admin.Query
{
/// <summary>
///
/// </summary>
public class QueryGroupOption : PaginationOption
{
/// <summary>

View File

@ -5,6 +5,9 @@ using System.Linq;
namespace Bootstrap.Admin.Query
{
/// <summary>
///
/// </summary>
public class QueryLogOption : PaginationOption
{
/// <summary>

View File

@ -5,6 +5,9 @@ using System.Linq;
namespace Bootstrap.Admin.Query
{
/// <summary>
///
/// </summary>
public class QueryMenuOption : PaginationOption
{
/// <summary>
@ -23,7 +26,11 @@ namespace Bootstrap.Admin.Query
///
/// </summary>
public string IsResource { get; set; }
/// <summary>
///
/// </summary>
/// <param name="userName"></param>
/// <returns></returns>
public QueryData<BootstrapMenu> RetrieveData(string userName)
{
var data = MenuHelper.RetrieveMenusByUserName(userName);

View File

@ -4,6 +4,9 @@ using System.Linq;
namespace Bootstrap.Admin.Query
{
/// <summary>
///
/// </summary>
public class QueryRoleOption : PaginationOption
{
/// <summary>

View File

@ -17,7 +17,10 @@ namespace Bootstrap.Admin.Query
///
/// </summary>
public string DisplayName { get; set; }
/// <summary>
///
/// </summary>
/// <returns></returns>
public QueryData<User> RetrieveData()
{
// int limit, int offset, string name, string price, string sort, string order

View File

@ -14,13 +14,13 @@ namespace Bootstrap.Admin
///
/// </summary>
/// <param name="client"></param>
/// <param name="message"></param>
/// <param name="args"></param>
/// <returns></returns>
public static async System.Threading.Tasks.Task Send(IClientProxy client, MessageBody args) => await client.SendAsync("rev", args);
/// <summary>
///
/// </summary>
/// <param name="client"></param>
/// <param name="context"></param>
/// <param name="ex"></param>
/// <returns></returns>
public static async System.Threading.Tasks.Task Send<T>(IHubContext<T> context, Exception ex) where T : Hub