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