XFE Git
XFE Studio Git
Git 首页 全局搜索
XFE 主站 文档 NuGet

XFEExtension.NetCore.ServerInteractive

[DLL] Server interaction extension, including user identity verification and querying in conjunction with AutoConfig

公开
关注 0 Fork 0 Star 0
返回提交历史

XFEstudio/XFEExtension.NetCore.ServerInteractive

Revert "添加泛型传参,待测试"

This reverts commit c7c9806071cb89ff2b9840f6f2ce499681a262e0.

b4e7c32
XFE工作室室长 <mail@xfegzs.com>
提交于

代码差异

9 个文件 +33 -56
Modified XFEExtension.NetCore.ServerInteractive.TServer/Program.cs +1 -3
@@ -1,5 +1,4 @@
1 1 using XFEExtension.NetCore.ServerInteractive.Interfaces;
2 using XFEExtension.NetCore.ServerInteractive.Models;
3 2 using XFEExtension.NetCore.ServerInteractive.Models.UserModels;
4 3 using XFEExtension.NetCore.ServerInteractive.TServer;
5 4 using XFEExtension.NetCore.ServerInteractive.TServer.Models;
@@ -12,13 +11,12 @@ var server = XFEServerBuilder.CreateBuilder() //创建服务器构建器
12 11 .UseXFEServer() //使用XFE服务器架构
13 12 .AddCoreServer( //添加核心服务器
14 13 XFEServerCoreBuilder.CreateBuilder() //创建核心服务器构建器
15 .UseXFEStandardServerCore<User, IUserFaceInfo>( //使用XFE标准服务器核心 泛型:<存储的用户类型, 登录返回的用户模型>
14 .UseXFEStandardServerCore<IUserFaceInfo>( //使用XFE标准服务器核心
16 15 static () => UserProfile.UserTable, //获取用户表的方法
17 16 static () => UserProfile.EncryptedUserLoginModelTable, //获取用户加密模型的方法
18 17 UserProfile.EncryptedUserLoginModelTable.Add, //添加用户加密模型的方法
19 18 static user => UserProfile.EncryptedUserLoginModelTable.Remove(user), //移除用户加密模型的方法
20 19 static () => 7, // 获取登录维持天数方法
21 static user => user, //登录返回用户转换方法
22 20 XFEDataTableManagerBuilder.CreateBuilder() //创建DataTable管理器构建器
23 21 .AddTable<Person, DataProfile>("人物", (int)UserRole.业务员, (int)UserRole.经理, (int)UserRole.业务员, (int)UserRole.业务员) //添加名为人物的表格,Person类型,AutoConfig为DataProfile。添加更改获取权限为业务员,移除权限为经理
24 22 .AddTable<Order, DataProfile>("订单", (int)UserRole.业务员, (int)UserRole.经理, (int)UserRole.业务员, (int)UserRole.业务员) //添加名为订单的表格,Order类型,AutoConfig为DataProfile。添加更改获取权限为业务员,移除权限为经理
Modified XFEExtension.NetCore.ServerInteractive/Interfaces/IUserServiceBase.cs +3 -3
@@ -6,7 +6,7 @@ namespace XFEExtension.NetCore.ServerInteractive.Interfaces;
6 6 /// <summary>
7 7 /// 用户服务基类
8 8 /// </summary>
9 public interface IUserServiceBase<T> where T : IUserInfo
9 public interface IUserServiceBase
10 10 {
11 11 /// <summary>
12 12 /// Json序列化设置
@@ -23,7 +23,7 @@ public interface IUserServiceBase<T> where T : IUserInfo
23 23 /// <summary>
24 24 /// 添加用户方法
25 25 /// </summary>
26 Action<T> AddUserFunction { get; set; }
26 Action<IUserInfo> AddUserFunction { get; set; }
27 27 /// <summary>
28 28 /// 获取加密用户模型方法
29 29 /// </summary>
@@ -35,5 +35,5 @@ public interface IUserServiceBase<T> where T : IUserInfo
35 35 /// <summary>
36 36 /// 获取用户方法
37 37 /// </summary>
38 Func<IEnumerable<T>> GetUserFunction { get; set; }
38 Func<IEnumerable<IUserInfo>> GetUserFunction { get; set; }
39 39 }
Modified XFEExtension.NetCore.ServerInteractive/Utilities/Server/Services/CoreService/IpBannerService.cs +4 -5
@@ -1,5 +1,4 @@
1 1 using System.Net;
2 using XFEExtension.NetCore.ServerInteractive.Interfaces;
3 2 using XFEExtension.NetCore.ServerInteractive.Models.ServerModels;
4 3 using XFEExtension.NetCore.ServerInteractive.Profiles;
5 4 using XFEExtension.NetCore.ServerInteractive.Utilities.Helpers;
@@ -11,7 +10,7 @@ namespace XFEExtension.NetCore.ServerInteractive.Utilities.Server.Services.CoreS
11 10 /// <summary>
12 11 /// IP封禁服务
13 12 /// </summary>
14 public class IpBannerService<T> : ServerCoreUserServiceBase<T> where T : IUserInfo
13 public class IpBannerService : ServerCoreUserServiceBase
15 14 {
16 15 /// <summary>
17 16 /// 获取权限
@@ -32,12 +31,12 @@ public class IpBannerService<T> : ServerCoreUserServiceBase<T> where T : IUserIn
32 31 {
33 32 case "get_bannedIpList":
34 33 Console.Write($"【{r.Args.ClientIP}】获取禁止的IP地址列表请求");
35 UserHelper.ValidatePermission(queryableJsonNode["session"], queryableJsonNode["computerInfo"], r.Args.ClientIP, GetPermission, GetEncryptedUserLoginModelFunction(), GetUserFunction().Cast<IUserInfo>(), r);
34 UserHelper.ValidatePermission(queryableJsonNode["session"], queryableJsonNode["computerInfo"], r.Args.ClientIP, GetPermission, GetEncryptedUserLoginModelFunction(), GetUserFunction(), r);
36 35 await r.Args.ReplyAndClose(ServerBaseProfile.BannedIPAddressList.ToJson());
37 36 break;
38 37 case "add_bannedIp":
39 38 Console.WriteLine($"【{r.Args.ClientIP}】添加禁止的IP地址请求 添加:{queryableJsonNode["bannedIp"]}");
40 UserHelper.ValidatePermission(queryableJsonNode["session"], queryableJsonNode["computerInfo"], r.Args.ClientIP, AddPermission, GetEncryptedUserLoginModelFunction(), GetUserFunction().Cast<IUserInfo>(), r);
39 UserHelper.ValidatePermission(queryableJsonNode["session"], queryableJsonNode["computerInfo"], r.Args.ClientIP, AddPermission, GetEncryptedUserLoginModelFunction(), GetUserFunction(), r);
41 40 if (queryableJsonNode["bannedIp"] is null) r.Error("无IP地址传入", HttpStatusCode.BadRequest);
42 41 ServerBaseProfile.BannedIPAddressList.Add(new()
43 42 {
@@ -48,7 +47,7 @@ public class IpBannerService<T> : ServerCoreUserServiceBase<T> where T : IUserIn
48 47 break;
49 48 case "remove_bannedIp":
50 49 Console.WriteLine($"【{r.Args.ClientIP}】删除禁止的IP地址请求 移除:{queryableJsonNode["bannedIp"]}");
51 UserHelper.ValidatePermission(queryableJsonNode["session"], queryableJsonNode["computerInfo"], r.Args.ClientIP, RemovePermission, GetEncryptedUserLoginModelFunction(), GetUserFunction().Cast<IUserInfo>(), r);
50 UserHelper.ValidatePermission(queryableJsonNode["session"], queryableJsonNode["computerInfo"], r.Args.ClientIP, RemovePermission, GetEncryptedUserLoginModelFunction(), GetUserFunction(), r);
52 51 var targetIp = ServerBaseProfile.BannedIPAddressList.FirstOrDefault(ip => ip.IPAddress == queryableJsonNode["bannedIp"].ToString()) ?? throw r.GetError("无IP地址传入", HttpStatusCode.BadRequest);
53 52 await r.Args.ReplyAndClose(ServerBaseProfile.BannedIPAddressList.Remove(targetIp).ToString());
54 53 break;
Deleted XFEExtension.NetCore.ServerInteractive/Utilities/Server/Services/CoreService/ServerCoreUserLoginServiceBase.cs +0 -12
@@ -1,12 +0,0 @@
1 using XFEExtension.NetCore.ServerInteractive.Interfaces;
2
3 namespace XFEExtension.NetCore.ServerInteractive.Utilities.Server.Services.CoreService;
4
5 ///<inheritdoc/>
6 public abstract class ServerCoreUserLoginServiceBase<T, F> : ServerCoreUserServiceBase<T> where T : IUserInfo where F : class
7 {
8 /// <summary>
9 /// 登录结果转换方法
10 /// </summary>
11 public Func<T, F> LoginResultConverter { get; set; } = static user => (F)(object)user;
12 }
Modified XFEExtension.NetCore.ServerInteractive/Utilities/Server/Services/CoreService/ServerCoreUserServiceBase.cs +3 -3
@@ -7,16 +7,16 @@ using XFEExtension.NetCore.ServerInteractive.Utilities.JsonConverter;
7 7 namespace XFEExtension.NetCore.ServerInteractive.Utilities.Server.Services.CoreService;
8 8
9 9 /// <inheritdoc/>
10 public abstract class ServerCoreUserServiceBase<T> : ServerCoreStandardRegisterAsyncServiceBase, IUserServiceBase<T> where T : IUserInfo
10 public abstract class ServerCoreUserServiceBase : ServerCoreStandardRegisterAsyncServiceBase, IUserServiceBase
11 11 {
12 12 /// <inheritdoc/>
13 public Func<IEnumerable<T>> GetUserFunction { get; set; } = () => [];
13 public Func<IEnumerable<IUserInfo>> GetUserFunction { get; set; } = () => [];
14 14 /// <inheritdoc/>
15 15 public Func<IEnumerable<EncryptedUserLoginModel>> GetEncryptedUserLoginModelFunction { get; set; } = () => [];
16 16 /// <inheritdoc/>
17 17 public Action<EncryptedUserLoginModel> AddEncryptedUserLoginModelFunction { get; set; } = _ => { };
18 18 /// <inheritdoc/>
19 public Action<T> AddUserFunction { get; set; } = _ => { };
19 public Action<IUserInfo> AddUserFunction { get; set; } = _ => { };
20 20 /// <inheritdoc/>
21 21 public Func<int> GetLoginKeepDays { get; set; } = () => 7;
22 22 /// <inheritdoc/>
Modified XFEExtension.NetCore.ServerInteractive/Utilities/Server/Services/CoreService/UserLoginService.cs +4 -4
@@ -12,7 +12,7 @@ namespace XFEExtension.NetCore.ServerInteractive.Utilities.Server.Services.CoreS
12 12 /// <summary>
13 13 /// 用户登录服务
14 14 /// </summary>
15 public class UserLoginService<T, F> : ServerCoreUserLoginServiceBase<T, F> where T : IUserInfo where F : class
15 public class UserLoginService<T> : ServerCoreUserServiceBase where T : IUserFaceInfo
16 16 {
17 17 /// <inheritdoc/>
18 18 public override async Task StandardRequestReceived(string execute, QueryableJsonNode queryableJsonNode, ServerCoreReturnArgs r)
@@ -24,7 +24,7 @@ public class UserLoginService<T, F> : ServerCoreUserLoginServiceBase<T, F> where
24 24 if (account.IsNullOrWhiteSpace()) r.Error("账户名不能为空", HttpStatusCode.BadRequest);
25 25 if (password.IsNullOrWhiteSpace()) r.Error("登录密码不能为空", HttpStatusCode.BadRequest);
26 26 if (computerInfo.IsNullOrWhiteSpace()) r.Error("电脑信息不能为空", HttpStatusCode.BadRequest);
27 var user = UserHelper.GetUser(queryableJsonNode["account"], queryableJsonNode["password"], GetUserFunction().Cast<IUserInfo>(), r);
27 var user = UserHelper.GetUser(queryableJsonNode["account"], queryableJsonNode["password"], GetUserFunction(), r);
28 28 Console.WriteLine($"{account}({computerInfo})");
29 29 var userLoginList = GetEncryptedUserLoginModelFunction().Where(userLogin => userLogin.UserLoginModel.ComputerInfo == computerInfo);
30 30 var userLogin = GetEncryptedUserLoginModelFunction().FirstOrDefault(userLogin => userLogin.UserLoginModel.UID == user.ID);
@@ -57,7 +57,7 @@ public class UserLoginService<T, F> : ServerCoreUserLoginServiceBase<T, F> where
57 57 {
58 58 session = $"{user.ID}|{UserHelper.Encrypt(userLogin.Key, userLogin.UserLoginModel)}",
59 59 expireDate = userLogin.UserLoginModel.EndDateTime,
60 userInfo = LoginResultConverter((T)user)
60 userInfo = (T)user
61 61 }.ToJson(), HttpStatusCode.OK);
62 62 }
63 63 else
@@ -70,7 +70,7 @@ public class UserLoginService<T, F> : ServerCoreUserLoginServiceBase<T, F> where
70 70 {
71 71 session = $"{user.ID}|{UserHelper.Encrypt(userLogin.Key, userLogin.UserLoginModel)}",
72 72 expireDate = userLogin.UserLoginModel.EndDateTime,
73 userInfo = LoginResultConverter((T)user)
73 userInfo = (T)user
74 74 }.ToJson(), HttpStatusCode.OK);
75 75 }
76 76 }
Modified XFEExtension.NetCore.ServerInteractive/Utilities/Server/Services/CoreService/UserReloginService.cs +3 -3
@@ -13,7 +13,7 @@ namespace XFEExtension.NetCore.ServerInteractive.Utilities.Server.Services.CoreS
13 13 /// <summary>
14 14 /// 用户登录校验服务
15 15 /// </summary>
16 public class UserReloginService<T, F> : ServerCoreUserLoginServiceBase<T, F> where T : IUserInfo where F : class
16 public class UserReloginService<T> : ServerCoreUserServiceBase where T : IUserFaceInfo
17 17 {
18 18 /// <inheritdoc/>
19 19 public override async Task StandardRequestReceived(string execute, QueryableJsonNode queryableJsonNode, ServerCoreReturnArgs r)
@@ -30,10 +30,10 @@ public class UserReloginService<T, F> : ServerCoreUserLoginServiceBase<T, F> whe
30 30 var userLoginModel = UserHelper.Decrypt<UserLoginModel>(encryptedUserLoginModel.Key, split[1]);
31 31 if (userLoginModel.UID.IsNullOrWhiteSpace() || userLoginModel.UID != encryptedUserLoginModel.UserLoginModel.UID)
32 32 r.Error("登录用户ID不匹配", HttpStatusCode.Forbidden);
33 var user = UserHelper.GetUser(userLoginModel.UID, GetUserFunction().Cast<IUserFaceInfo>()) ?? throw r.GetError("用户ID未注册", HttpStatusCode.Forbidden);
33 var user = UserHelper.GetUser(userLoginModel.UID, GetUserFunction()) ?? throw r.GetError("用户ID未注册", HttpStatusCode.Forbidden);
34 34 if (userLoginModel.LastIPAddress != r.Args.ClientIP) r.Error("IP地址不匹配", HttpStatusCode.Forbidden);
35 35 if (userLoginModel.LastIPAddress != encryptedUserLoginModel.UserLoginModel.LastIPAddress) r.Error("IP地址不匹配", HttpStatusCode.Forbidden);
36 36 if (userLoginModel.EndDateTime < DateTime.Now) r.Error("登录已过期", HttpStatusCode.Forbidden);
37 await r.Args.ReplyAndClose(LoginResultConverter((T)user).ToJson());
37 await r.Args.ReplyAndClose(((T)user).ToJson());
38 38 }
39 39 }
Modified XFEExtension.NetCore.ServerInteractive/Utilities/Server/Services/CoreService/UserServiceBase.cs +3 -3
@@ -6,10 +6,10 @@ using XFEExtension.NetCore.ServerInteractive.Utilities.JsonConverter;
6 6 namespace XFEExtension.NetCore.ServerInteractive.Utilities.Server.Services.CoreService;
7 7
8 8 /// <inheritdoc/>
9 public abstract class UserServiceBase<T> : IUserServiceBase<T> where T : IUserInfo
9 public abstract class UserServiceBase : IUserServiceBase
10 10 {
11 11 /// <inheritdoc/>
12 public Func<IEnumerable<T>> GetUserFunction { get; set; } = () => [];
12 public Func<IEnumerable<IUserInfo>> GetUserFunction { get; set; } = () => [];
13 13 /// <inheritdoc/>
14 14 public Func<IEnumerable<EncryptedUserLoginModel>> GetEncryptedUserLoginModelFunction { get; set; } = () => [];
15 15 /// <inheritdoc/>
@@ -17,7 +17,7 @@ public abstract class UserServiceBase<T> : IUserServiceBase<T> where T : IUserIn
17 17 /// <inheritdoc/>
18 18 public Action<EncryptedUserLoginModel> RemoveEncryptedUserLoginModelFunction { get; set; } = _ => { };
19 19 /// <inheritdoc/>
20 public Action<T> AddUserFunction { get; set; } = _ => { };
20 public Action<IUserInfo> AddUserFunction { get; set; } = _ => { };
21 21 /// <inheritdoc/>
22 22 public Func<int> GetLoginKeepDays { get; set; } = () => 7;
23 23 /// <inheritdoc/>
Modified XFEExtension.NetCore.ServerInteractive/Utilities/XFEServerCoreBuilderExtensions.cs +12 -20
@@ -19,46 +19,40 @@ public static class XFEServerCoreBuilderExtensions
19 19 /// <param name="getUserFunction"></param>
20 20 /// <param name="getEncryptedUserLoginModelFunction"></param>
21 21 /// <returns></returns>
22 public static XFEServerCoreBuilder AddDataTableManager(this XFEServerCoreBuilder xFEServerCoreBuilder, XFEDataTableManagerBuilder xFEDataTableManagerBuilder, Func<IEnumerable<IUserInfo>> getUserFunction, Func<IEnumerable<EncryptedUserLoginModel>> getEncryptedUserLoginModelFunction) => xFEServerCoreBuilder.AddParameter("TableManager", xFEDataTableManagerBuilder.Build(getUserFunction, getEncryptedUserLoginModelFunction)).RegisterStandardAsyncService<XFEDataTableManagerService>(xFEDataTableManagerBuilder.ExecuteList);
22 public static XFEServerCoreBuilder AddDataTableManager(this XFEServerCoreBuilder xFEServerCoreBuilder, XFEDataTableManagerBuilder xFEDataTableManagerBuilder, Func<IEnumerable<User>> getUserFunction, Func<IEnumerable<EncryptedUserLoginModel>> getEncryptedUserLoginModelFunction) => xFEServerCoreBuilder.AddParameter("TableManager", xFEDataTableManagerBuilder.Build(getUserFunction, getEncryptedUserLoginModelFunction)).RegisterStandardAsyncService<XFEDataTableManagerService>(xFEDataTableManagerBuilder.ExecuteList);
23 23
24 24 /// <summary>
25 25 /// 添加用户基本参数
26 26 /// </summary>
27 /// <typeparam name="T">用户登录模型</typeparam>
28 /// <typeparam name="F">登录返回用户接口类型</typeparam>
29 27 /// <param name="xFEServerCoreBuilder"></param>
30 28 /// <param name="getUserFunction"></param>
31 29 /// <param name="getEncryptedUserLoginModelFunction"></param>
32 30 /// <param name="addEncryptedUserLoginModelFunction"></param>
33 31 /// <param name="removeEncryptedUserLoginModelFunction"></param>
34 32 /// <param name="getLoginKeepDays"></param>
35 /// <param name="loginResultConverter"></param>
36 33 /// <returns></returns>
37 public static XFEServerCoreBuilder AddUserParameterBase<T, F>(this XFEServerCoreBuilder xFEServerCoreBuilder, Func<IEnumerable<T>> getUserFunction, Func<IEnumerable<EncryptedUserLoginModel>> getEncryptedUserLoginModelFunction, Action<EncryptedUserLoginModel> addEncryptedUserLoginModelFunction, Action<EncryptedUserLoginModel> removeEncryptedUserLoginModelFunction, Func<int> getLoginKeepDays, Func<T, F> loginResultConverter) where T : IUserInfo where F : class => xFEServerCoreBuilder.AddParameter("GetUserFunction", getUserFunction)
34 public static XFEServerCoreBuilder AddUserParameterBase(this XFEServerCoreBuilder xFEServerCoreBuilder, Func<IEnumerable<User>> getUserFunction, Func<IEnumerable<EncryptedUserLoginModel>> getEncryptedUserLoginModelFunction, Action<EncryptedUserLoginModel> addEncryptedUserLoginModelFunction, Action<EncryptedUserLoginModel> removeEncryptedUserLoginModelFunction, Func<int> getLoginKeepDays) => xFEServerCoreBuilder.AddParameter("GetUserFunction", getUserFunction)
38 35 .AddParameter("GetEncryptedUserLoginModelFunction", getEncryptedUserLoginModelFunction)
39 36 .AddParameter("AddEncryptedUserLoginModelFunction", addEncryptedUserLoginModelFunction)
40 37 .AddParameter("RemoveEncryptedUserLoginModelFunction", removeEncryptedUserLoginModelFunction)
41 .AddParameter("GetLoginKeepDays", getLoginKeepDays)
42 .AddParameter("LoginResultConverter", loginResultConverter);
38 .AddParameter("GetLoginKeepDays", getLoginKeepDays);
43 39
44 40 /// <summary>
45 41 /// 使用XFE标准登录服务
46 42 /// </summary>
47 /// <typeparam name="T">用户登录模型</typeparam>
48 /// <typeparam name="F">登录返回用户接口类型</typeparam>
43 /// <typeparam name="T">登录返回用户接口类型</typeparam>
49 44 /// <param name="xFEServerCoreBuilder"></param>
50 45 /// <returns></returns>
51 public static XFEServerCoreBuilder AddStandardLoginService<T, F>(this XFEServerCoreBuilder xFEServerCoreBuilder) where T : IUserInfo where F : class => xFEServerCoreBuilder.RegisterStandardAsyncService<UserLoginService<T, F>>("login")
52 .RegisterStandardAsyncService<UserReloginService<T, F>>("relogin")
46 public static XFEServerCoreBuilder AddStandardLoginService<T>(this XFEServerCoreBuilder xFEServerCoreBuilder) where T : IUserFaceInfo => xFEServerCoreBuilder.RegisterStandardAsyncService<UserLoginService<T>>("login")
47 .RegisterStandardAsyncService<UserReloginService<T>>("relogin")
53 48 .AddService<UserLoginAutoCleanService>();
54 49
55 50 /// <summary>
56 51 /// 添加IP封禁服务
57 52 /// </summary>
58 /// <typeparam name="T">用户登录模型</typeparam>
59 53 /// <param name="xFEServerCoreBuilder"></param>
60 54 /// <returns></returns>
61 public static XFEServerCoreBuilder AddIpBannerService<T>(this XFEServerCoreBuilder xFEServerCoreBuilder) where T : IUserInfo => xFEServerCoreBuilder.RegisterStandardAsyncService<IpBannerService<T>>(["get_bannedIpList", "add_bannedIp", "remove_bannedIp"]);
55 public static XFEServerCoreBuilder AddIpBannerService(this XFEServerCoreBuilder xFEServerCoreBuilder) => xFEServerCoreBuilder.RegisterStandardAsyncService<IpBannerService>(["get_bannedIpList", "add_bannedIp", "remove_bannedIp"]);
62 56
63 57 /// <summary>
64 58 /// 添加日期统计服务
@@ -91,23 +85,21 @@ public static class XFEServerCoreBuilderExtensions
91 85 /// <summary>
92 86 /// 使用XFE标准服务器核心
93 87 /// </summary>
94 /// <typeparam name="T">用户登录模型</typeparam>
95 /// <typeparam name="F">登录返回用户接口类型</typeparam>
88 /// <typeparam name="T">登录返回用户接口类型</typeparam>
96 89 /// <param name="xFEServerCoreBuilder"></param>
97 90 /// <param name="getUserFunction"></param>
98 91 /// <param name="getEncryptedUserLoginModelFunction"></param>
99 92 /// <param name="addEncryptedUserLoginModelFunction"></param>
100 93 /// <param name="removeEncryptedUserLoginModelFunction"></param>
101 94 /// <param name="getLoginKeepDays"></param>
102 /// <param name="loginResultConverter"></param>
103 95 /// <param name="xFEDataTableManagerBuilder"></param>
104 96 /// <returns></returns>
105 public static XFEServerCoreBuilder UseXFEStandardServerCore<T, F>(this XFEServerCoreBuilder xFEServerCoreBuilder, Func<IEnumerable<T>> getUserFunction, Func<IEnumerable<EncryptedUserLoginModel>> getEncryptedUserLoginModelFunction, Action<EncryptedUserLoginModel> addEncryptedUserLoginModelFunction, Action<EncryptedUserLoginModel> removeEncryptedUserLoginModelFunction, Func<int> getLoginKeepDays, Func<T, F> loginResultConverter, XFEDataTableManagerBuilder xFEDataTableManagerBuilder) where T : IUserInfo where F : class => xFEServerCoreBuilder.AddUserParameterBase(getUserFunction, getEncryptedUserLoginModelFunction, addEncryptedUserLoginModelFunction, removeEncryptedUserLoginModelFunction, getLoginKeepDays, loginResultConverter)
106 .AddDataTableManager(xFEDataTableManagerBuilder, () => getUserFunction().Cast<IUserInfo>(), getEncryptedUserLoginModelFunction)
97 public static XFEServerCoreBuilder UseXFEStandardServerCore<T>(this XFEServerCoreBuilder xFEServerCoreBuilder, Func<IEnumerable<User>> getUserFunction, Func<IEnumerable<EncryptedUserLoginModel>> getEncryptedUserLoginModelFunction, Action<EncryptedUserLoginModel> addEncryptedUserLoginModelFunction, Action<EncryptedUserLoginModel> removeEncryptedUserLoginModelFunction, Func<int> getLoginKeepDays, XFEDataTableManagerBuilder xFEDataTableManagerBuilder) where T : IUserFaceInfo => xFEServerCoreBuilder.AddUserParameterBase(getUserFunction, getEncryptedUserLoginModelFunction, addEncryptedUserLoginModelFunction, removeEncryptedUserLoginModelFunction, getLoginKeepDays)
98 .AddDataTableManager(xFEDataTableManagerBuilder, getUserFunction, getEncryptedUserLoginModelFunction)
107 99 .AddEntryPotinVerify()
108 100 .AddDailyCounterService()
109 101 .AddXFEErrorProcessService()
110 102 .AddConnectService()
111 .AddStandardLoginService<T, F>()
112 .AddIpBannerService<T>();
103 .AddStandardLoginService<T>()
104 .AddIpBannerService();
113 105 }