mirror of
https://gitee.com/ThingsGateway/ThingsGateway.git
synced 2025-10-20 10:50:48 +08:00
build: 10.11.102
This commit is contained in:
@@ -14,7 +14,7 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="BootstrapBlazor.TableExport" Version="9.2.7" />
|
<PackageReference Include="BootstrapBlazor.TableExport" Version="9.2.7" />
|
||||||
<PackageReference Include="Yitter.IdGenerator" Version="1.0.14" />
|
<PackageReference Include="Yitter.IdGenerator" Version="1.0.14" />
|
||||||
<PackageReference Include="BootstrapBlazor" Version="9.11.1" />
|
<PackageReference Include="BootstrapBlazor" Version="9.11.2" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
@@ -1,4 +1,5 @@
|
|||||||
using System.Collections.Concurrent;
|
using System.Collections.Concurrent;
|
||||||
|
using System.Runtime.CompilerServices;
|
||||||
|
|
||||||
using ThingsGateway.NewLife.Threading;
|
using ThingsGateway.NewLife.Threading;
|
||||||
namespace ThingsGateway.NewLife;
|
namespace ThingsGateway.NewLife;
|
||||||
@@ -51,18 +52,20 @@ public class ExpiringDictionary<TKey, TValue> : IDisposable
|
|||||||
return rs;
|
return rs;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
private ConcurrentDictionary<TKey, CacheItem> _dict;
|
||||||
|
|
||||||
private ConcurrentDictionary<TKey, CacheItem> _dict = new();
|
|
||||||
private readonly TimerX _cleanupTimer;
|
private readonly TimerX _cleanupTimer;
|
||||||
private int defaultExpire = 60;
|
private int defaultExpire = 60;
|
||||||
public ExpiringDictionary(int expire = 60)
|
IEqualityComparer<TKey>? comparer;
|
||||||
|
public ExpiringDictionary(int expire = 60, IEqualityComparer<TKey>? comparer = null)
|
||||||
{
|
{
|
||||||
defaultExpire = expire;
|
defaultExpire = expire;
|
||||||
|
this.comparer = comparer;
|
||||||
|
_dict = new ConcurrentDictionary<TKey, CacheItem>(comparer);
|
||||||
|
|
||||||
_cleanupTimer = new TimerX(TimerClear, null, 10000, 10000) { Async = true };
|
_cleanupTimer = new TimerX(TimerClear, null, 10000, 10000) { Async = true };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public bool TryAdd(TKey key, TValue value)
|
public bool TryAdd(TKey key, TValue value)
|
||||||
{
|
{
|
||||||
if (_dict.TryGetValue(key, out var item))
|
if (_dict.TryGetValue(key, out var item))
|
||||||
@@ -109,7 +112,7 @@ public class ExpiringDictionary<TKey, TValue> : IDisposable
|
|||||||
private void Clear(object? state)
|
private void Clear(object? state)
|
||||||
{
|
{
|
||||||
var data = _dict;
|
var data = _dict;
|
||||||
_dict = new();
|
_dict = new(comparer);
|
||||||
data.Clear();
|
data.Clear();
|
||||||
}
|
}
|
||||||
private void TimerClear(object? state)
|
private void TimerClear(object? state)
|
||||||
@@ -143,3 +146,4 @@ public class ExpiringDictionary<TKey, TValue> : IDisposable
|
|||||||
_cleanupTimer.Dispose();
|
_cleanupTimer.Dispose();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -31,7 +31,7 @@
|
|||||||
<PackageReference Include="Npgsql" Version="9.0.4" />
|
<PackageReference Include="Npgsql" Version="9.0.4" />
|
||||||
<PackageReference Include="CsvHelper" Version="33.1.0" />
|
<PackageReference Include="CsvHelper" Version="33.1.0" />
|
||||||
<PackageReference Include="TDengine.Connector" Version="3.1.9" />
|
<PackageReference Include="TDengine.Connector" Version="3.1.9" />
|
||||||
<PackageReference Include="Oracle.ManagedDataAccess.Core" Version="23.9.1" />
|
<PackageReference Include="Oracle.ManagedDataAccess.Core" Version="23.26.0" />
|
||||||
<PackageReference Include="Oscar.Data.SqlClient" Version="4.2.28" />
|
<PackageReference Include="Oscar.Data.SqlClient" Version="4.2.28" />
|
||||||
<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.1.2" />
|
<PackageReference Include="Microsoft.Data.SqlClient" Version="6.1.2" />
|
||||||
|
@@ -1,9 +1,9 @@
|
|||||||
<Project>
|
<Project>
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<PluginVersion>10.11.101</PluginVersion>
|
<PluginVersion>10.11.102</PluginVersion>
|
||||||
<ProPluginVersion>10.11.101</ProPluginVersion>
|
<ProPluginVersion>10.11.102</ProPluginVersion>
|
||||||
<DefaultVersion>10.11.101</DefaultVersion>
|
<DefaultVersion>10.11.102</DefaultVersion>
|
||||||
<AuthenticationVersion>10.11.6</AuthenticationVersion>
|
<AuthenticationVersion>10.11.6</AuthenticationVersion>
|
||||||
<SourceGeneratorVersion>10.11.6</SourceGeneratorVersion>
|
<SourceGeneratorVersion>10.11.6</SourceGeneratorVersion>
|
||||||
<NET8Version>8.0.20</NET8Version>
|
<NET8Version>8.0.20</NET8Version>
|
||||||
|
@@ -57,7 +57,7 @@ public partial class VariableRow : IDisposable
|
|||||||
/// <param name="col"></param>
|
/// <param name="col"></param>
|
||||||
/// <param name="item"></param>
|
/// <param name="item"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
protected RenderFragment GetValue(ITableColumn col, VariableRuntime item) => builder =>
|
protected static RenderFragment GetValue(ITableColumn col, VariableRuntime item) => builder =>
|
||||||
{
|
{
|
||||||
if (col.Template != null)
|
if (col.Template != null)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user