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

修复构建器扩展中未添加泛型参数的问题

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

代码差异

2 个文件 +10 -7
Modified XFEExtension.NetCore.ServerInteractive/Utilities/XFEServerCoreBuilderExtensions.cs +8 -5
@@ -1,5 +1,4 @@
1 using XFEExtension.NetCore.ServerInteractive.Interfaces;
2 using XFEExtension.NetCore.ServerInteractive.Models.UserModels;
1 using XFEExtension.NetCore.ServerInteractive.Models.UserModels;
3 2 using XFEExtension.NetCore.ServerInteractive.Utilities.DataTable;
4 3 using XFEExtension.NetCore.ServerInteractive.Utilities.Server;
5 4 using XFEExtension.NetCore.ServerInteractive.Utilities.Server.Services.CoreService;
@@ -24,18 +23,21 @@ public static class XFEServerCoreBuilderExtensions
24 23 /// <summary>
25 24 /// 添加用户基本参数
26 25 /// </summary>
26 /// <typeparam name="T">登录返回用户接口类型</typeparam>
27 27 /// <param name="xFEServerCoreBuilder"></param>
28 28 /// <param name="getUserFunction"></param>
29 29 /// <param name="getEncryptedUserLoginModelFunction"></param>
30 30 /// <param name="addEncryptedUserLoginModelFunction"></param>
31 31 /// <param name="removeEncryptedUserLoginModelFunction"></param>
32 32 /// <param name="getLoginKeepDays"></param>
33 /// <param name="loginResultConvertFunction"></param>
33 34 /// <returns></returns>
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)
35 public static XFEServerCoreBuilder AddUserParameterBase<T>(this XFEServerCoreBuilder xFEServerCoreBuilder, Func<IEnumerable<User>> getUserFunction, Func<IEnumerable<EncryptedUserLoginModel>> getEncryptedUserLoginModelFunction, Action<EncryptedUserLoginModel> addEncryptedUserLoginModelFunction, Action<EncryptedUserLoginModel> removeEncryptedUserLoginModelFunction, Func<int> getLoginKeepDays, Func<object, T> loginResultConvertFunction) where T : class => xFEServerCoreBuilder.AddParameter("GetUserFunction", getUserFunction)
35 36 .AddParameter("GetEncryptedUserLoginModelFunction", getEncryptedUserLoginModelFunction)
36 37 .AddParameter("AddEncryptedUserLoginModelFunction", addEncryptedUserLoginModelFunction)
37 38 .AddParameter("RemoveEncryptedUserLoginModelFunction", removeEncryptedUserLoginModelFunction)
38 .AddParameter("GetLoginKeepDays", getLoginKeepDays);
39 .AddParameter("GetLoginKeepDays", getLoginKeepDays)
40 .AddParameter("LoginResultConvertFunction", loginResultConvertFunction);
39 41
40 42 /// <summary>
41 43 /// 使用XFE标准登录服务
@@ -93,8 +95,9 @@ public static class XFEServerCoreBuilderExtensions
93 95 /// <param name="removeEncryptedUserLoginModelFunction"></param>
94 96 /// <param name="getLoginKeepDays"></param>
95 97 /// <param name="xFEDataTableManagerBuilder"></param>
98 /// <param name="loginResultConvertFunction"></param>
96 99 /// <returns></returns>
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 : class => xFEServerCoreBuilder.AddUserParameterBase(getUserFunction, getEncryptedUserLoginModelFunction, addEncryptedUserLoginModelFunction, removeEncryptedUserLoginModelFunction, getLoginKeepDays)
100 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, Func<object, T> loginResultConvertFunction) where T : class => xFEServerCoreBuilder.AddUserParameterBase(getUserFunction, getEncryptedUserLoginModelFunction, addEncryptedUserLoginModelFunction, removeEncryptedUserLoginModelFunction, getLoginKeepDays, loginResultConvertFunction)
98 101 .AddDataTableManager(xFEDataTableManagerBuilder, getUserFunction, getEncryptedUserLoginModelFunction)
99 102 .AddEntryPotinVerify()
100 103 .AddDailyCounterService()
Modified XFEExtension.NetCore.ServerInteractive/XFEExtension.NetCore.ServerInteractive.csproj +2 -2
@@ -5,7 +5,7 @@
5 5 <ImplicitUsings>enable</ImplicitUsings>
6 6 <Nullable>enable</Nullable>
7 7 <GenerateDocumentationFile>True</GenerateDocumentationFile>
8 <Version>1.0.7</Version>
8 <Version>1.0.8</Version>
9 9 <Title>XFEExtension.NetCore.ServerInteractive</Title>
10 10 <RepositoryUrl>https://github.com/XFEstudio/XFEExtension.NetCore.ServerInteractive</RepositoryUrl>
11 11 <AnalysisLevel>latest</AnalysisLevel>
@@ -21,7 +21,7 @@
21 21 <PackageReleaseNotes>
22 22 ## 调整
23 23
24 现在,可以返回自己的用户登录模型,而非固定的继承于IUserFaceInfo的模型
24 修复构建器扩展中未添加泛型参数的问题
25 25
26 26 ## 新增
27 27