From 81fce993573b54dffbec9539a1d81585cc23a938 Mon Sep 17 00:00:00 2001 From: Argo-MacBookPro Date: Sun, 28 Oct 2018 15:08:58 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=B3=A8=E9=87=8A=EF=BC=9A?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=89=80=E6=9C=89=E7=B1=BB=E6=B3=A8=E9=87=8A?= =?UTF-8?q?=EF=BC=8C=E7=A7=BB=E9=99=A4xml=E8=AD=A6=E5=91=8A=E4=BF=A1?= =?UTF-8?q?=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/Api/CategoryController.cs | 5 ++++- .../Controllers/Api/ExceptionsController.cs | 7 ++++++- Bootstrap.Admin/Controllers/Api/LogsController.cs | 6 +++++- .../Controllers/Api/ProfilesController.cs | 6 ++++++ .../Controllers/Api/RegisterController.cs | 6 +++++- .../Controllers/Api/SettingsController.cs | 1 - Bootstrap.Admin/Models/HeaderBarModel.cs | 7 +++++++ Bootstrap.Admin/Models/NavigatorBarModel.cs | 7 +++++++ Bootstrap.Admin/Program.cs | 13 ++++++++++++- Bootstrap.Admin/Query/QueryDictOption.cs | 3 +++ Bootstrap.Admin/Query/QueryExceptionOption.cs | 3 +++ Bootstrap.Admin/Query/QueryGroupOption.cs | 3 +++ Bootstrap.Admin/Query/QueryLogOption.cs | 3 +++ Bootstrap.Admin/Query/QueryMenuOption.cs | 9 ++++++++- Bootstrap.Admin/Query/QueryRoleOption.cs | 3 +++ Bootstrap.Admin/Query/QueryUserOption.cs | 5 ++++- Bootstrap.Admin/SignalR/SignalRManager.cs | 4 ++-- 17 files changed, 81 insertions(+), 10 deletions(-) diff --git a/Bootstrap.Admin/Controllers/Api/CategoryController.cs b/Bootstrap.Admin/Controllers/Api/CategoryController.cs index 4bf04241..83526843 100644 --- a/Bootstrap.Admin/Controllers/Api/CategoryController.cs +++ b/Bootstrap.Admin/Controllers/Api/CategoryController.cs @@ -5,11 +5,14 @@ using System.Collections.Generic; namespace Bootstrap.Admin.Controllers.Api { + /// + /// 数据字典分类 + /// [Route("api/[controller]")] public class CategoryController : Controller { /// - /// + /// 获取字典表中所有Category数据 /// /// [HttpGet] diff --git a/Bootstrap.Admin/Controllers/Api/ExceptionsController.cs b/Bootstrap.Admin/Controllers/Api/ExceptionsController.cs index b0799c04..afc6b895 100644 --- a/Bootstrap.Admin/Controllers/Api/ExceptionsController.cs +++ b/Bootstrap.Admin/Controllers/Api/ExceptionsController.cs @@ -67,9 +67,14 @@ namespace Bootstrap.Admin.Controllers.Api } return new JsonResult(sb.ToString()); } - + /// + /// + /// public class ExceptionFileQuery { + /// + /// + /// public string FileName { get; set; } } } diff --git a/Bootstrap.Admin/Controllers/Api/LogsController.cs b/Bootstrap.Admin/Controllers/Api/LogsController.cs index 0560fbdf..ce1398a7 100644 --- a/Bootstrap.Admin/Controllers/Api/LogsController.cs +++ b/Bootstrap.Admin/Controllers/Api/LogsController.cs @@ -32,7 +32,11 @@ namespace Bootstrap.Admin.Controllers.Api { return LogHelper.RetrieveLogs().FirstOrDefault(t => t.Id == id); } - + /// + /// + /// + /// + /// [HttpPost] public bool Post([FromBody]Log value) { diff --git a/Bootstrap.Admin/Controllers/Api/ProfilesController.cs b/Bootstrap.Admin/Controllers/Api/ProfilesController.cs index 549a1dfb..09e53b19 100644 --- a/Bootstrap.Admin/Controllers/Api/ProfilesController.cs +++ b/Bootstrap.Admin/Controllers/Api/ProfilesController.cs @@ -14,6 +14,12 @@ namespace Bootstrap.Admin.Controllers.Api [Route("api/[controller]")] public class ProfilesController : Controller { + /// + /// + /// + /// + /// + /// [HttpPost] public async Task Post([FromServices]IHostingEnvironment env, IFormCollection files) { diff --git a/Bootstrap.Admin/Controllers/Api/RegisterController.cs b/Bootstrap.Admin/Controllers/Api/RegisterController.cs index 54a247cf..30ec648e 100644 --- a/Bootstrap.Admin/Controllers/Api/RegisterController.cs +++ b/Bootstrap.Admin/Controllers/Api/RegisterController.cs @@ -8,6 +8,9 @@ using System.Threading.Tasks; namespace Bootstrap.Admin.Controllers.Api { + /// + /// 注册用户操作类 + /// [AllowAnonymous] [Route("api/[controller]")] public class RegisterController : Controller @@ -15,7 +18,7 @@ namespace Bootstrap.Admin.Controllers.Api /// /// 登录页面注册新用户remote validate调用 /// - /// + /// /// [HttpGet] public bool Get(string userName) @@ -25,6 +28,7 @@ namespace Bootstrap.Admin.Controllers.Api /// /// 登录页面注册新用户提交按钮调用 /// + /// /// /// [HttpPost] diff --git a/Bootstrap.Admin/Controllers/Api/SettingsController.cs b/Bootstrap.Admin/Controllers/Api/SettingsController.cs index a3977699..8f624f2d 100644 --- a/Bootstrap.Admin/Controllers/Api/SettingsController.cs +++ b/Bootstrap.Admin/Controllers/Api/SettingsController.cs @@ -26,7 +26,6 @@ namespace Bootstrap.Admin.Controllers.Api /// /// /// - /// [HttpGet] public IEnumerable Get() { diff --git a/Bootstrap.Admin/Models/HeaderBarModel.cs b/Bootstrap.Admin/Models/HeaderBarModel.cs index 90ec0cf4..57c67a34 100644 --- a/Bootstrap.Admin/Models/HeaderBarModel.cs +++ b/Bootstrap.Admin/Models/HeaderBarModel.cs @@ -8,6 +8,10 @@ namespace Bootstrap.Admin.Models /// public class HeaderBarModel : ModelBase { + /// + /// + /// + /// 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; } + /// + /// + /// public string UserName { get; } /// /// diff --git a/Bootstrap.Admin/Models/NavigatorBarModel.cs b/Bootstrap.Admin/Models/NavigatorBarModel.cs index bc155de3..aebab48d 100644 --- a/Bootstrap.Admin/Models/NavigatorBarModel.cs +++ b/Bootstrap.Admin/Models/NavigatorBarModel.cs @@ -5,8 +5,15 @@ using System.Collections.Generic; namespace Bootstrap.Admin.Models { + /// + /// + /// public class NavigatorBarModel : HeaderBarModel { + /// + /// + /// + /// public NavigatorBarModel(ControllerBase controller) : base(controller.User.Identity) { Navigations = MenuHelper.RetrieveSystemMenus(UserName, $"~{controller.HttpContext.Request.Path}"); diff --git a/Bootstrap.Admin/Program.cs b/Bootstrap.Admin/Program.cs index c3a06117..0c86ce36 100644 --- a/Bootstrap.Admin/Program.cs +++ b/Bootstrap.Admin/Program.cs @@ -3,13 +3,24 @@ using Microsoft.AspNetCore.Hosting; namespace Bootstrap.Admin { + /// + /// + /// public class Program { + /// + /// + /// + /// public static void Main(string[] args) { CreateWebHostBuilder(args).Build().Run(); } - + /// + /// + /// + /// + /// public static IWebHostBuilder CreateWebHostBuilder(string[] args) => WebHost.CreateDefaultBuilder(args).UseStartup(); } diff --git a/Bootstrap.Admin/Query/QueryDictOption.cs b/Bootstrap.Admin/Query/QueryDictOption.cs index 9fb513dd..5f0aad6c 100644 --- a/Bootstrap.Admin/Query/QueryDictOption.cs +++ b/Bootstrap.Admin/Query/QueryDictOption.cs @@ -5,6 +5,9 @@ using System.Linq; namespace Bootstrap.Admin.Query { + /// + /// + /// public class QueryDictOption : PaginationOption { /// diff --git a/Bootstrap.Admin/Query/QueryExceptionOption.cs b/Bootstrap.Admin/Query/QueryExceptionOption.cs index 3d6d481f..a96d0ec0 100644 --- a/Bootstrap.Admin/Query/QueryExceptionOption.cs +++ b/Bootstrap.Admin/Query/QueryExceptionOption.cs @@ -5,6 +5,9 @@ using System.Linq; namespace Bootstrap.Admin.Query { + /// + /// + /// public class QueryExceptionOption : PaginationOption { /// diff --git a/Bootstrap.Admin/Query/QueryGroupOption.cs b/Bootstrap.Admin/Query/QueryGroupOption.cs index 08f055f4..f12bd1a3 100644 --- a/Bootstrap.Admin/Query/QueryGroupOption.cs +++ b/Bootstrap.Admin/Query/QueryGroupOption.cs @@ -4,6 +4,9 @@ using System.Linq; namespace Bootstrap.Admin.Query { + /// + /// + /// public class QueryGroupOption : PaginationOption { /// diff --git a/Bootstrap.Admin/Query/QueryLogOption.cs b/Bootstrap.Admin/Query/QueryLogOption.cs index a65fb473..c3f22150 100644 --- a/Bootstrap.Admin/Query/QueryLogOption.cs +++ b/Bootstrap.Admin/Query/QueryLogOption.cs @@ -5,6 +5,9 @@ using System.Linq; namespace Bootstrap.Admin.Query { + /// + /// + /// public class QueryLogOption : PaginationOption { /// diff --git a/Bootstrap.Admin/Query/QueryMenuOption.cs b/Bootstrap.Admin/Query/QueryMenuOption.cs index b5dfbe7b..67cb9b51 100644 --- a/Bootstrap.Admin/Query/QueryMenuOption.cs +++ b/Bootstrap.Admin/Query/QueryMenuOption.cs @@ -5,6 +5,9 @@ using System.Linq; namespace Bootstrap.Admin.Query { + /// + /// + /// public class QueryMenuOption : PaginationOption { /// @@ -23,7 +26,11 @@ namespace Bootstrap.Admin.Query /// /// public string IsResource { get; set; } - + /// + /// + /// + /// + /// public QueryData RetrieveData(string userName) { var data = MenuHelper.RetrieveMenusByUserName(userName); diff --git a/Bootstrap.Admin/Query/QueryRoleOption.cs b/Bootstrap.Admin/Query/QueryRoleOption.cs index 019a5238..1d2df7bb 100644 --- a/Bootstrap.Admin/Query/QueryRoleOption.cs +++ b/Bootstrap.Admin/Query/QueryRoleOption.cs @@ -4,6 +4,9 @@ using System.Linq; namespace Bootstrap.Admin.Query { + /// + /// + /// public class QueryRoleOption : PaginationOption { /// diff --git a/Bootstrap.Admin/Query/QueryUserOption.cs b/Bootstrap.Admin/Query/QueryUserOption.cs index b0a821bc..69a98e5e 100644 --- a/Bootstrap.Admin/Query/QueryUserOption.cs +++ b/Bootstrap.Admin/Query/QueryUserOption.cs @@ -17,7 +17,10 @@ namespace Bootstrap.Admin.Query /// /// public string DisplayName { get; set; } - + /// + /// + /// + /// public QueryData RetrieveData() { // int limit, int offset, string name, string price, string sort, string order diff --git a/Bootstrap.Admin/SignalR/SignalRManager.cs b/Bootstrap.Admin/SignalR/SignalRManager.cs index 04147627..10319e24 100644 --- a/Bootstrap.Admin/SignalR/SignalRManager.cs +++ b/Bootstrap.Admin/SignalR/SignalRManager.cs @@ -14,13 +14,13 @@ namespace Bootstrap.Admin /// /// /// - /// + /// /// public static async System.Threading.Tasks.Task Send(IClientProxy client, MessageBody args) => await client.SendAsync("rev", args); /// /// /// - /// + /// /// /// public static async System.Threading.Tasks.Task Send(IHubContext context, Exception ex) where T : Hub