style: 增加xml注释

This commit is contained in:
Argo-MacBookPro 2019-06-24 10:42:59 +08:00
parent a25ae6e265
commit 50f23827d8
No known key found for this signature in database
GPG Key ID: 152E398953DDF19F
19 changed files with 138 additions and 8 deletions

View File

@ -3,13 +3,25 @@ using Microsoft.AspNetCore.Hosting;
namespace Bootstrap.Client
{
/// <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

@ -14,16 +14,30 @@ using System;
namespace Bootstrap.Client
{
/// <summary>
///
/// </summary>
public class Startup
{
/// <summary>
///
/// </summary>
/// <param name="configuration"></param>
public Startup(IConfiguration configuration)
{
Configuration = configuration;
}
/// <summary>
///
/// </summary>
public IConfiguration Configuration { get; }
// This method gets called by the runtime. Use this method to add services to the container.
/// <summary>
///
/// </summary>
/// <param name="services"></param>
public void ConfigureServices(IServiceCollection services)
{
services.Configure<CookiePolicyOptions>(options =>
@ -53,6 +67,11 @@ namespace Bootstrap.Client
}
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
/// <summary>
///
/// </summary>
/// <param name="app"></param>
/// <param name="env"></param>
public void Configure(IApplicationBuilder app, IHostingEnvironment env)
{
if (env.IsDevelopment())

View File

@ -5,6 +5,9 @@ using System.Linq;
namespace Bootstrap.DataAccess.MongoDB
{
/// <summary>
///
/// </summary>
public class App : DataAccess.App
{
/// <summary>

View File

@ -86,8 +86,6 @@ namespace Bootstrap.DataAccess.MongoDB
/// <summary>
/// 删除日志信息
/// </summary>
/// <param name="value"></param>
/// <returns></returns>
private static void DeleteLogAsync() => System.Threading.Tasks.Task.Run(() => DbManager.Logs.DeleteMany(log => log.LogTime < DateTime.Now.AddDays(-7)));
/// <summary>

View File

@ -27,6 +27,9 @@ namespace Bootstrap.DataAccess.MongoDB
///
/// </summary>
/// <param name="po"></param>
/// <param name="startTime"></param>
/// <param name="endTime"></param>
/// <param name="ip"></param>
/// <returns></returns>
public override Page<DataAccess.LoginUser> RetrieveByPages(PaginationOption po, DateTime? startTime, DateTime? endTime, string ip)
{

View File

@ -2,6 +2,9 @@
namespace Bootstrap.DataAccess.MongoDB
{
/// <summary>
///
/// </summary>
public class RejectUser
{
/// <summary>
@ -9,16 +12,34 @@ namespace Bootstrap.DataAccess.MongoDB
/// </summary>
public string Id { get; set; }
/// <summary>
///
/// </summary>
public string UserName { get; set; }
/// <summary>
///
/// </summary>
public string DisplayName { get; set; }
/// <summary>
///
/// </summary>
public DateTime RegisterTime { get; set; }
/// <summary>
///
/// </summary>
public string RejectedBy { get; set; }
/// <summary>
///
/// </summary>
public DateTime RejectedTime { get; set; }
/// <summary>
///
/// </summary>
public string RejectedReason { get; set; }
}
}

View File

@ -22,7 +22,6 @@ namespace Bootstrap.DataAccess.MongoDB
/// <summary>
///
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
public override IEnumerable<DataAccess.Role> Retrieves()
{

View File

@ -58,6 +58,12 @@ namespace Bootstrap.DataAccess.MongoDB
return u != null && !string.IsNullOrEmpty(u.PassSalt) && u.Password == LgbCryptography.ComputeHash(password, u.PassSalt);
}
/// <summary>
///
/// </summary>
/// <param name="userName"></param>
/// <param name="app"></param>
/// <returns></returns>
public override bool SaveApp(string userName, string app)
{
var update = Builders<User>.Update.Set(u => u.App, app);

View File

@ -6,6 +6,9 @@ using System.Linq;
namespace Bootstrap.DataAccess
{
/// <summary>
///
/// </summary>
public class App
{
/// <summary>

View File

@ -14,6 +14,7 @@ namespace Bootstrap.DataAccess
///
/// </summary>
/// <param name="connectionName"></param>
/// <param name="keepAlive"></param>
/// <returns></returns>
public static IDatabase Create(string connectionName = null, bool keepAlive = false)
{

View File

@ -1,5 +1,4 @@
using Bootstrap.Security.DataAccess;
using Longbow.Data;
using PetaPoco;
using System;
using System.Collections.Generic;
@ -37,14 +36,13 @@ namespace Bootstrap.DataAccess
/// <summary>
/// 查询所有群组信息
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
public virtual IEnumerable<Group> Retrieves() => DbManager.Create().Fetch<Group>();
/// <summary>
/// 删除群组信息
/// </summary>
/// <param name="ids"></param>
/// <param name="value"></param>
public virtual bool Delete(IEnumerable<string> value)
{
bool ret = false;

View File

@ -4,8 +4,14 @@ using System.Collections.Generic;
namespace Bootstrap.DataAccess
{
/// <summary>
///
/// </summary>
public static class AppHelper
{
/// <summary>
///
/// </summary>
public const string RetrieveAppsByRoleIdDataKey = "AppHelper-RetrieveAppsByRoleId";
/// <summary>

View File

@ -1,4 +1,4 @@
using Longbow.Cache;
using Longbow.Cache;
using Longbow.Data;
using System.Collections.Generic;
@ -9,9 +9,21 @@ namespace Bootstrap.DataAccess
/// </summary>
public static class GroupHelper
{
/// <summary>
///
/// </summary>
public const string RetrieveGroupsDataKey = "GroupHelper-RetrieveGroups";
/// <summary>
///
/// </summary>
public const string RetrieveGroupsByUserIdDataKey = "GroupHelper-RetrieveGroupsByUserId";
/// <summary>
///
/// </summary>
public const string RetrieveGroupsByRoleIdDataKey = "GroupHelper-RetrieveGroupsByRoleId";
/// <summary>
///
/// </summary>
public const string RetrieveGroupsByUserNameDataKey = "GroupHelper-RetrieveGroupsByUserName";
/// <summary>

View File

@ -15,6 +15,9 @@ namespace Bootstrap.DataAccess
/// 查询所有日志信息
/// </summary>
/// <param name="op"></param>
/// <param name="startTime"></param>
/// <param name="endTime"></param>
/// <param name="opType"></param>
/// <returns></returns>
public static Page<Log> RetrievePages(PaginationOption op, DateTime? startTime, DateTime? endTime, string opType) => DbContextManager.Create<Log>().RetrievePages(op, startTime, endTime, opType);

View File

@ -14,7 +14,7 @@ namespace Bootstrap.DataAccess
/// <summary>
///
/// </summary>
/// <param name="userName"></param>
/// <param name="user"></param>
/// <returns></returns>
public static bool Log(LoginUser user)
{

View File

@ -14,29 +14,34 @@ namespace Bootstrap.DataAccess
///
/// </summary>
public const string RetrieveMessageDataKey = "MessageHelper-RetrieveMessages";
/// <summary>
/// 收件箱
/// </summary>
/// <param name="userName"></param>
public static IEnumerable<Message> Inbox(string userName) => DbContextManager.Create<Message>().Inbox(userName);
/// <summary>
/// 发件箱
/// </summary>
/// <param name="userName"></param>
/// <returns></returns>
public static IEnumerable<Message> SendMail(string userName) => DbContextManager.Create<Message>().SendMail(userName);
/// <summary>
/// 垃圾箱
/// </summary>
/// <param name="userName"></param>
/// <returns></returns>
public static IEnumerable<Message> Trash(string userName) => DbContextManager.Create<Message>().Trash(userName);
/// <summary>
/// 标旗
/// </summary>
/// <param name="userName"></param>
/// <returns></returns>
public static IEnumerable<Message> Mark(string userName) => DbContextManager.Create<Message>().Mark(userName);
/// <summary>
/// 获取Header处显示的消息列表
/// </summary>
@ -44,6 +49,11 @@ namespace Bootstrap.DataAccess
/// <returns></returns>
public static IEnumerable<Message> Retrieves(string userName) => CacheManager.GetOrAdd(RetrieveMessageDataKey, key => DbContextManager.Create<Message>().RetrieveHeaders(userName).OrderByDescending(n => n.SendTime));
/// <summary>
///
/// </summary>
/// <param name="msg"></param>
/// <returns></returns>
public static bool Save(Message msg)
{
if (string.IsNullOrEmpty(msg.Id)) msg.Id = null;

View File

@ -11,11 +11,29 @@ namespace Bootstrap.DataAccess
/// </summary>
public static class RoleHelper
{
/// <summary>
///
/// </summary>
public const string RetrieveRolesDataKey = "RoleHelper-RetrieveRoles";
/// <summary>
///
/// </summary>
public const string RetrieveRolesByUserIdDataKey = "RoleHelper-RetrieveRolesByUserId";
/// <summary>
///
/// </summary>
public const string RetrieveRolesByMenuIdDataKey = "RoleHelper-RetrieveRolesByMenuId";
/// <summary>
///
/// </summary>
public const string RetrieveRolesByGroupIdDataKey = "RoleHelper-RetrieveRolesByGroupId";
/// <summary>
///
/// </summary>
public const string RetrieveRolesByUserNameDataKey = "RoleHelper-RetrieveRolesByUserName";
/// <summary>
///
/// </summary>
public const string RetrieveRolesByUrlDataKey = "RoleHelper-RetrieveRolesByUrl";
/// <summary>

View File

@ -8,6 +8,9 @@ using System.Collections.Generic;
namespace Bootstrap.DataAccess
{
/// <summary>
///
/// </summary>
public static class TraceHelper
{

View File

@ -13,10 +13,25 @@ namespace Bootstrap.DataAccess
/// </summary>
public static class UserHelper
{
/// <summary>
///
/// </summary>
public const string RetrieveUsersDataKey = "UserHelper-RetrieveUsers";
/// <summary>
///
/// </summary>
public const string RetrieveUsersByRoleIdDataKey = "UserHelper-RetrieveUsersByRoleId";
/// <summary>
///
/// </summary>
public const string RetrieveUsersByGroupIdDataKey = "UserHelper-RetrieveUsersByGroupId";
/// <summary>
///
/// </summary>
public const string RetrieveNewUsersDataKey = "UserHelper-RetrieveNewUsers";
/// <summary>
///
/// </summary>
public const string RetrieveUsersByNameDataKey = "BootstrapUser-RetrieveUsersByName";
private static bool UserChecker(User user)