mirror of
https://gitee.com/ThingsGateway/ThingsGateway.git
synced 2025-10-21 03:01:28 +08:00
Compare commits
5 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
1c7f8b5cab | ||
![]() |
b7ff9ffca2 | ||
![]() |
9bba9bda76 | ||
![]() |
ec2fcc75d3 | ||
![]() |
57a4038577 |
@@ -10,7 +10,6 @@
|
||||
|
||||
using BootstrapBlazor.Components;
|
||||
|
||||
using Microsoft.AspNetCore.Builder;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
|
||||
using System.Reflection;
|
||||
@@ -67,7 +66,7 @@ public class Startup : AppStartup
|
||||
|
||||
}
|
||||
|
||||
public void Use(IApplicationBuilder applicationBuilder)
|
||||
public void Use(IServiceProvider serviceProvider)
|
||||
{
|
||||
//检查ConfigId
|
||||
var configIdGroup = DbContext.DbConfigs.GroupBy(it => it.ConfigId);
|
||||
|
@@ -14,6 +14,7 @@
|
||||
"ThingsGateway.SqlSugar",
|
||||
"ThingsGateway.Admin.Application",
|
||||
"ThingsGateway.Admin.Razor",
|
||||
"ThingsGateway.DB",
|
||||
"ThingsGateway.Razor"
|
||||
]
|
||||
},
|
||||
|
@@ -14,6 +14,7 @@
|
||||
"ThingsGateway.SqlSugar",
|
||||
"ThingsGateway.Admin.Application",
|
||||
"ThingsGateway.Admin.Razor",
|
||||
"ThingsGateway.DB",
|
||||
"ThingsGateway.Razor"
|
||||
]
|
||||
},
|
||||
|
@@ -40,6 +40,7 @@ public class SingleFilePublish : ISingleFilePublish
|
||||
"ThingsGateway.NewLife.X",
|
||||
"ThingsGateway.Razor",
|
||||
"ThingsGateway.Admin.Razor" ,
|
||||
"ThingsGateway.DB",
|
||||
"ThingsGateway.Admin.Application",
|
||||
"ThingsGateway.SqlSugar",
|
||||
];
|
||||
|
@@ -48,11 +48,11 @@ public class Startup : AppStartup
|
||||
});
|
||||
|
||||
|
||||
// 事件总线
|
||||
services.AddEventBus(options =>
|
||||
{
|
||||
//// 事件总线
|
||||
//services.AddEventBus(options =>
|
||||
//{
|
||||
|
||||
});
|
||||
//});
|
||||
|
||||
// 任务调度
|
||||
services.AddSchedule(options =>
|
||||
@@ -151,8 +151,6 @@ public class Startup : AppStartup
|
||||
});
|
||||
|
||||
|
||||
services.AddHealthChecks();
|
||||
|
||||
|
||||
#region 控制台美化
|
||||
|
||||
|
@@ -66,7 +66,8 @@ public static class CodeFirstUtils
|
||||
{
|
||||
// 按主键进行批量增加和更新
|
||||
var storage = db.StorageableByObject(seedData.ToList()).ToStorage();
|
||||
if (ignoreAdd == null) storage.AsInsertable.ExecuteCommand();//执行插入
|
||||
if (ignoreAdd == null)
|
||||
storage.AsInsertable.ExecuteCommand();//执行插入
|
||||
if (ignoreUpdate == null && config.IsUpdateSeedData) storage.AsUpdateable.ExecuteCommand();//只有没有忽略更新的特性才执行更新
|
||||
}
|
||||
else// 没有主键或者不是预定义的主键(有重复的可能)
|
||||
|
@@ -10,7 +10,6 @@
|
||||
|
||||
using BootstrapBlazor.Components;
|
||||
|
||||
using Microsoft.AspNetCore.Builder;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
|
||||
using ThingsGateway.SqlSugar;
|
||||
@@ -32,11 +31,10 @@ public class Startup : AppStartup
|
||||
|
||||
StaticConfig.EnableAllWhereIF = true;
|
||||
|
||||
services.AddSingleton<ISugarAopService, SugarAopService>();
|
||||
|
||||
}
|
||||
|
||||
public void Use(IApplicationBuilder applicationBuilder)
|
||||
public void Use(IServiceProvider serviceProvider)
|
||||
{
|
||||
|
||||
|
||||
|
@@ -67,13 +67,13 @@ internal static class Penetrates
|
||||
["patch"] = "PATCH"
|
||||
};
|
||||
|
||||
IsApiControllerCached = new ConcurrentDictionary<Type, bool>();
|
||||
//IsApiControllerCached = new ConcurrentDictionary<Type, bool>();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <see cref="IsApiController(Type)"/> 缓存集合
|
||||
/// </summary>
|
||||
private static readonly ConcurrentDictionary<Type, bool> IsApiControllerCached;
|
||||
///// <summary>
|
||||
///// <see cref="IsApiController(Type)"/> 缓存集合
|
||||
///// </summary>
|
||||
//private static readonly ConcurrentDictionary<Type, bool> IsApiControllerCached;
|
||||
|
||||
/// <summary>
|
||||
/// 是否是Api控制器
|
||||
@@ -82,8 +82,8 @@ internal static class Penetrates
|
||||
/// <returns></returns>
|
||||
internal static bool IsApiController(Type type)
|
||||
{
|
||||
return IsApiControllerCached.GetOrAdd(type, Function);
|
||||
|
||||
//return IsApiControllerCached.GetOrAdd(type, Function);
|
||||
return Function(type);
|
||||
// 本地静态方法
|
||||
static bool Function(Type type)
|
||||
{
|
||||
|
@@ -8,7 +8,6 @@
|
||||
// QQ群:605534569
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using Microsoft.AspNetCore.Builder;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
|
||||
using ThingsGateway.NewLife;
|
||||
@@ -59,7 +58,7 @@ public class Startup : AppStartup
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
public void Use(IApplicationBuilder applicationBuilder)
|
||||
public void Use(IServiceProvider serviceProvider)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
@@ -117,7 +117,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
internal static class ReflectionInoHelper
|
||||
public static class ReflectionInoHelper
|
||||
{
|
||||
private static List<Action> removeActions = new List<Action>();
|
||||
internal static void AddRemoveFunc(Action removeAction)
|
||||
|
@@ -30,7 +30,7 @@
|
||||
<PackageReference Include="CsvHelper" Version="33.1.0" />
|
||||
<PackageReference Include="TDengine.Connector" Version="3.1.6" />
|
||||
<PackageReference Include="Oracle.ManagedDataAccess.Core" Version="23.8.0" />
|
||||
<PackageReference Include="Oscar.Data.SqlClient" Version="4.2.18" />
|
||||
<PackageReference Include="Oscar.Data.SqlClient" Version="4.2.20" />
|
||||
<PackageReference Include="System.Data.Common" Version="4.3.0" />
|
||||
<PackageReference Include="Microsoft.Data.SqlClient" Version="6.0.2" />
|
||||
<PackageReference Include="System.Reflection.Emit.Lightweight" Version="4.7.0" />
|
||||
|
@@ -1,9 +1,9 @@
|
||||
<Project>
|
||||
|
||||
<PropertyGroup>
|
||||
<PluginVersion>10.7.52</PluginVersion>
|
||||
<ProPluginVersion>10.7.52</ProPluginVersion>
|
||||
<AuthenticationVersion>2.5.0</AuthenticationVersion>
|
||||
<PluginVersion>10.7.55</PluginVersion>
|
||||
<ProPluginVersion>10.7.55</ProPluginVersion>
|
||||
<AuthenticationVersion>2.6.0</AuthenticationVersion>
|
||||
<NET8Version>8.0.17</NET8Version>
|
||||
<NET9Version>9.0.6</NET9Version>
|
||||
</PropertyGroup>
|
||||
|
@@ -185,7 +185,8 @@ public static class TextFileReader
|
||||
if (fs.Length == 0) return 0;
|
||||
|
||||
var newPos = position;
|
||||
byte[] buffer = _bytePool.Rent(maxRead); // 从池中租借字节数组
|
||||
var len = (int)Math.Min(fs.Length, maxRead);
|
||||
byte[] buffer = _bytePool.Rent(len); // 从池中租借字节数组
|
||||
int index = 0;
|
||||
|
||||
try
|
||||
@@ -200,7 +201,7 @@ public static class TextFileReader
|
||||
|
||||
if (byteRead == -1) break;
|
||||
|
||||
if (index >= maxRead)
|
||||
if (index >= len)
|
||||
{
|
||||
newPos = -1;
|
||||
return newPos;
|
||||
|
@@ -1,6 +1,4 @@
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
using ThingsGateway.Blazor.Diagrams.Core.Behaviors;
|
||||
using ThingsGateway.Blazor.Diagrams.Core.Behaviors;
|
||||
using ThingsGateway.Blazor.Diagrams.Core.Controls;
|
||||
using ThingsGateway.Blazor.Diagrams.Core.Events;
|
||||
using ThingsGateway.Blazor.Diagrams.Core.Extensions;
|
||||
@@ -9,10 +7,6 @@ using ThingsGateway.Blazor.Diagrams.Core.Layers;
|
||||
using ThingsGateway.Blazor.Diagrams.Core.Models.Base;
|
||||
using ThingsGateway.Blazor.Diagrams.Core.Options;
|
||||
|
||||
[assembly: InternalsVisibleTo("ThingsGateway.Blazor.Diagrams")]
|
||||
[assembly: InternalsVisibleTo("ThingsGateway.Blazor.Diagrams.Tests")]
|
||||
[assembly: InternalsVisibleTo("ThingsGateway.Blazor.Diagrams.Core.Tests")]
|
||||
|
||||
namespace ThingsGateway.Blazor.Diagrams.Core;
|
||||
|
||||
public abstract class Diagram
|
@@ -8,7 +8,4 @@
|
||||
// QQ群:605534569
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
global using Microsoft.Extensions.DependencyInjection;
|
||||
|
||||
global using ThingsGateway.Admin.Application;
|
||||
global using ThingsGateway.Foundation;
|
1
src/Gateway/ThingsGateway.Blazor.Diagrams.Core/README.md
Normal file
1
src/Gateway/ThingsGateway.Blazor.Diagrams.Core/README.md
Normal file
@@ -0,0 +1 @@
|
||||
https://github.com/Blazor-Diagrams/Blazor.Diagrams
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user