mirror of
https://github.com/ThingsGateway/ThingsGateway.git
synced 2026-10-17 05:07:56 +08:00
feat: 减少 GC 压力
This commit is contained in:
+4
-1
@@ -360,4 +360,7 @@ MigrationBackup/
|
||||
.ionide/
|
||||
|
||||
# Fody - auto-generated XML schema
|
||||
FodyWeavers.xsd
|
||||
FodyWeavers.xsd
|
||||
|
||||
|
||||
*DB/
|
||||
@@ -12,12 +12,12 @@
|
||||
<NoWarn>
|
||||
CS8002;NU1510;SYSLIB5007;CS8603;CS8618;CS1591;CS8625;CS8602;CS8604;CS8600;CS8601;CS8714;CS8619;CS8629;CS8765;CS8634;CS8621;CS8767;CS8633;CS8620;CS8610;CS8631;CS8605;CS8622;CS8613;NU5100;NU5104;NU1903;NU1902;CA1863;CA1812;CA1805;CA1515;CA1508;CA1819;CA1852;CA5394;CA1822;CA1815;CA1813;CA5358;CA5384;CA5400;CA5401;CA1814;CA1835;CA5392;CA5350;CA2100;CA1848;CA1810;CA1513;CA5351;CA1510;CA1512;CA1823;RCS1102;RCS1194;NETSDK1206
|
||||
</NoWarn>
|
||||
<TouchSocketVersion>4.1.8</TouchSocketVersion>
|
||||
<AdminVersion>12.5.1</AdminVersion>
|
||||
<FoundationVersion>12.5.2</FoundationVersion>
|
||||
<PluginVersion>12.5.2</PluginVersion>
|
||||
<ProPluginVersion>12.5.1</ProPluginVersion>
|
||||
<GatewayVersion>12.5.2</GatewayVersion>
|
||||
<TouchSocketVersion>4.1.9</TouchSocketVersion>
|
||||
<AdminVersion>12.5.2</AdminVersion>
|
||||
<FoundationVersion>12.5.4</FoundationVersion>
|
||||
<PluginVersion>12.5.5</PluginVersion>
|
||||
<ProPluginVersion>12.5.3</ProPluginVersion>
|
||||
<GatewayVersion>12.5.3</GatewayVersion>
|
||||
<Version>$(GatewayVersion)</Version>
|
||||
|
||||
<ManagementVersion>12.5.1</ManagementVersion>
|
||||
|
||||
@@ -128,4 +128,5 @@ public sealed class DefaultTableColumn(string fieldName, Type fieldType, string?
|
||||
public int Cols { get; set; }
|
||||
|
||||
public bool? IgnoreWhenExport { get; set; }
|
||||
public ISearchFormItemMetaData? SearchFormItemMetaData { get; set; }
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
"ConfigId": "DB_Admin", //ID
|
||||
//"ConnectionString": "server=localhost;Database=test;Uid=root;Pwd=111111;AllowLoadLocalInfile=true;", //连接字符串
|
||||
//"DatabaseType": "MySql", //数据库类型
|
||||
"ConnectionString": "Data Source=./DB/Admin.db;", //连接字符串
|
||||
"ConnectionString": "Data Source=../../../DB/Admin.db;", //连接字符串
|
||||
"DatabaseType": "Sqlite", //数据库类型
|
||||
"IsAutoCloseConnection": true, //是否自动释放
|
||||
"InitDatabase": true, //是否初始化数据库,适用于codefirst
|
||||
@@ -22,7 +22,7 @@
|
||||
"ConfigId": "DB_Log", //ID
|
||||
//"ConnectionString": "server=localhost;Database=test;Uid=root;Pwd=111111;AllowLoadLocalInfile=true;", //连接字符串
|
||||
//"DatabaseType": "MySql", //数据库类型
|
||||
"ConnectionString": "Data Source=./DB/Log.db", //连接字符串
|
||||
"ConnectionString": "Data Source=../../../DB/Log.db", //连接字符串
|
||||
"DatabaseType": "Sqlite", //数据库类型
|
||||
"IsAutoCloseConnection": true, //是否自动释放
|
||||
"InitDatabase": true, //是否初始化数据库,适用于codefirst
|
||||
@@ -35,7 +35,7 @@
|
||||
"ConfigId": "DB_TokenCache", //ID
|
||||
//"ConnectionString": "server=localhost;Database=test;Uid=root;Pwd=111111;AllowLoadLocalInfile=true;", //连接字符串
|
||||
//"DatabaseType": "MySql", //数据库类型
|
||||
"ConnectionString": "Data Source=./DB/TokenCache.db", //连接字符串
|
||||
"ConnectionString": "Data Source=../../../DB/TokenCache.db", //连接字符串
|
||||
"DatabaseType": "Sqlite", //数据库类型
|
||||
"IsAutoCloseConnection": true, //是否自动释放
|
||||
"InitDatabase": true, //是否初始化数据库,适用于codefirst
|
||||
@@ -48,7 +48,7 @@
|
||||
"ConfigId": "DB_HardwareInfo", //ID
|
||||
//"ConnectionString": "server=localhost;Database=test;Uid=root;Pwd=111111;AllowLoadLocalInfile=true;", //连接字符串
|
||||
//"DatabaseType": "MySql", //数据库类型
|
||||
"ConnectionString": "Data Source=./DB/HardwareInfo.db", //连接字符串
|
||||
"ConnectionString": "Data Source=../../../DB/HardwareInfo.db", //连接字符串
|
||||
"DatabaseType": "Sqlite", //数据库类型
|
||||
"IsAutoCloseConnection": true, //是否自动释放
|
||||
"InitDatabase": true, //是否初始化数据库,适用于codefirst
|
||||
@@ -61,7 +61,7 @@
|
||||
"ConfigId": "DB_Custom", //ID
|
||||
//"ConnectionString": "server=localhost;Database=test;Uid=root;Pwd=111111;AllowLoadLocalInfile=true;", //连接字符串
|
||||
//"DatabaseType": "MySql", //数据库类型
|
||||
"ConnectionString": "Data Source=./DB/ThingsGateway.db", //连接字符串
|
||||
"ConnectionString": "Data Source=../../../DB/ThingsGateway.db", //连接字符串
|
||||
"DatabaseType": "Sqlite", //数据库类型
|
||||
"IsAutoCloseConnection": true, //是否自动释放
|
||||
"InitDatabase": true, //是否初始化数据库,适用于codefirst
|
||||
|
||||
@@ -146,14 +146,14 @@ public class Program
|
||||
builder.UseSystemd();
|
||||
|
||||
if (Runtime.IsLegacyWindows)
|
||||
builder.ConfigureLogging(logging =>
|
||||
builder.ConfigureLogging(logging =>
|
||||
{
|
||||
//去除默认的事件日志提供者,某些情况下会日志输出异常,导致程序崩溃
|
||||
foreach (var provider in logging.Services.Where(s => s.ImplementationType?.Name == "EventLogLoggerProvider").ToList())
|
||||
{
|
||||
//去除默认的事件日志提供者,某些情况下会日志输出异常,导致程序崩溃
|
||||
foreach (var provider in logging.Services.Where(s => s.ImplementationType?.Name == "EventLogLoggerProvider").ToList())
|
||||
{
|
||||
logging.Services.Remove(provider);
|
||||
}
|
||||
});
|
||||
logging.Services.Remove(provider);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user