提交
This commit is contained in:
@@ -134,7 +134,7 @@ namespace DOAN.Common
|
||||
|
||||
//.net7需要这样写
|
||||
var coherentState = Cache.GetType().GetField("_coherentState", flags).GetValue(Cache);
|
||||
var entries = coherentState.GetType().GetField("_entries", flags).GetValue(coherentState);
|
||||
var entries = coherentState.GetType()?.GetField("_entries", flags)?.GetValue(coherentState);
|
||||
|
||||
var keys = new List<string>();
|
||||
if (entries is not IDictionary cacheItems) return keys;
|
||||
|
||||
@@ -23,4 +23,26 @@
|
||||
<PackageReference Include="IP2Region.Net" Version="2.0.2" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Reference Include="HslCommunication">
|
||||
<HintPath>dll\HslCommunication.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ICSharpCode.SharpZipLib">
|
||||
<HintPath>..\..\..\..\..\=====项目标准目录=====\3-设备程序\X1F1-服务器参数配置-20230908\packages\ICSharpCode.SharpZipLib.0.86.0.518\lib\net45\ICSharpCode.SharpZipLib.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="NPOI">
|
||||
<HintPath>..\..\..\..\..\=====项目标准目录=====\3-设备程序\X1F1-服务器参数配置-20230908\STBIN\RefAssembly\NPOI.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="NPOI.OOXML">
|
||||
<HintPath>..\..\..\..\..\=====项目标准目录=====\3-设备程序\X1F1-服务器参数配置-20230908\STBIN\RefAssembly\NPOI.OOXML.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="NPOI.OpenXml4Net">
|
||||
<HintPath>..\..\..\..\..\=====项目标准目录=====\3-设备程序\X1F1-服务器参数配置-20230908\STBIN\RefAssembly\NPOI.OpenXml4Net.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Register">
|
||||
<HintPath>dll\Register.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
32
Infrastructure/WebExtensions/HslCommunicationExtension.cs
Normal file
32
Infrastructure/WebExtensions/HslCommunicationExtension.cs
Normal file
@@ -0,0 +1,32 @@
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Register;
|
||||
|
||||
namespace DOAN.Infrastructure.WebExtensions
|
||||
{
|
||||
public static class HslCommunicationExtension
|
||||
{
|
||||
|
||||
public static void AddHslCommunication(this IServiceCollection services)
|
||||
{
|
||||
//if (!HslCommunication.Authorization.SetAuthorizationCode("71d19e25-1fc3-419f-adaa-8c14df37952a"))
|
||||
//{
|
||||
// Console.WriteLine("HslCommunication激活失败");
|
||||
|
||||
//}
|
||||
if (!Register.Reg.RegLicense())
|
||||
{
|
||||
Console.WriteLine("HslCommunication激活失败");
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.WriteLine("HslCommunication激活成功");
|
||||
}
|
||||
;
|
||||
}
|
||||
}
|
||||
}
|
||||
BIN
Infrastructure/dll/HslCommunication.dll
Normal file
BIN
Infrastructure/dll/HslCommunication.dll
Normal file
Binary file not shown.
BIN
Infrastructure/dll/Register.dll
Normal file
BIN
Infrastructure/dll/Register.dll
Normal file
Binary file not shown.
Reference in New Issue
Block a user