mirror of
https://gitee.com/ThingsGateway/ThingsGateway.git
synced 2025-11-04 01:23:58 +08:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
920e407d05 | ||
|
|
7314c8901d |
@@ -39,6 +39,7 @@ public partial class SysUserEdit
|
||||
var items = await SysPositionService.SelectorAsync(new PositionSelectorInput() { });
|
||||
Items = PositionUtil.BuildCascaderItemList(items);
|
||||
ModuleSelectedItems = ResourceUtil.BuildModuleSelectList((await SysResourceService.GetAllAsync())).ToList();
|
||||
await InvokeAsync(StateHasChanged);
|
||||
await base.OnInitializedAsync();
|
||||
}
|
||||
|
||||
|
||||
@@ -18,8 +18,6 @@ namespace ThingsGateway.Extension.Generic;
|
||||
[ThingsGateway.DependencyInjection.SuppressSniffer]
|
||||
public static class GenericExtensions
|
||||
{
|
||||
private static MemoryCache Instance { get; set; } = new MemoryCache();
|
||||
|
||||
/// <summary>
|
||||
/// 把已修改的属性赋值到列表中,并返回字典
|
||||
/// </summary>
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<Project>
|
||||
|
||||
<PropertyGroup>
|
||||
<PluginVersion>10.8.20</PluginVersion>
|
||||
<ProPluginVersion>10.8.20</ProPluginVersion>
|
||||
<PluginVersion>10.8.22</PluginVersion>
|
||||
<ProPluginVersion>10.8.22</ProPluginVersion>
|
||||
<AuthenticationVersion>2.8.4</AuthenticationVersion>
|
||||
<SourceGeneratorVersion>10.8.6</SourceGeneratorVersion>
|
||||
<NET8Version>8.0.17</NET8Version>
|
||||
|
||||
@@ -104,19 +104,20 @@ public class ExecuteScriptNode : TextNode, IActuatorNode, IExexcuteExpressionsBa
|
||||
}
|
||||
}
|
||||
|
||||
Task<OperResult<NodeOutput>> IActuatorNode.ExecuteAsync(NodeInput input, CancellationToken cancellationToken)
|
||||
async Task<OperResult<NodeOutput>> IActuatorNode.ExecuteAsync(NodeInput input, CancellationToken cancellationToken)
|
||||
{
|
||||
try
|
||||
{
|
||||
Logger?.Trace($"Execute script");
|
||||
var exexcuteExpressions = CSharpScriptEngineExtension.Do<IExexcuteExpressions>(Text);
|
||||
exexcuteExpressions.Logger = Logger;
|
||||
return exexcuteExpressions.ExecuteAsync(input, cancellationToken);
|
||||
var data = await exexcuteExpressions.ExecuteAsync(input, cancellationToken).ConfigureAwait(false);
|
||||
return new OperResult<NodeOutput>() { Content = data };
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Logger?.LogWarning(ex);
|
||||
return Task.FromResult(new OperResult<NodeOutput>(ex));
|
||||
return new OperResult<NodeOutput>(ex);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -30,6 +30,6 @@ public interface IExexcuteExpressionsBase
|
||||
public interface IExexcuteExpressions : IExexcuteExpressionsBase
|
||||
{
|
||||
public TouchSocket.Core.ILog Logger { get; set; }
|
||||
Task<OperResult<NodeOutput>> ExecuteAsync(NodeInput input, CancellationToken cancellationToken);
|
||||
Task<NodeOutput> ExecuteAsync(NodeInput input, CancellationToken cancellationToken);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<Project>
|
||||
<PropertyGroup>
|
||||
<Version>10.8.20</Version>
|
||||
<Version>10.8.22</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
Reference in New Issue
Block a user