daily uodate on 20240626 by nitload youmu[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[p
This commit is contained in:
@@ -35,6 +35,7 @@ using StgSharp.Entities;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
@@ -57,14 +58,12 @@ namespace StgSharp.Logic
|
||||
{
|
||||
|
||||
private protected bool levelAvailable, nativeRequested;
|
||||
|
||||
private protected Dictionary<string, BlueprintPipeline> _inputInterfaces;
|
||||
private protected Dictionary<string, BlueprintPipeline> _outputInterfaces;
|
||||
private protected int _level;
|
||||
private IConvertableToBlueprintNode mainOperation;
|
||||
private string name;
|
||||
|
||||
|
||||
internal BlueprintNode(string name,
|
||||
IConvertableToBlueprintNode node, bool isNative)
|
||||
{
|
||||
@@ -85,10 +84,13 @@ namespace StgSharp.Logic
|
||||
}
|
||||
}
|
||||
|
||||
public BlueprintNode(string name, bool isNative,
|
||||
|
||||
#pragma warning disable CS8618
|
||||
internal BlueprintNode(string name, bool isNative,
|
||||
string[] inputPorts,
|
||||
string[] outputPorts
|
||||
)
|
||||
#pragma warning restore CS8618
|
||||
{
|
||||
if (inputPorts == null || inputPorts.Length == 0)
|
||||
{
|
||||
@@ -260,34 +262,35 @@ namespace StgSharp.Logic
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
public static IConvertableToBlueprintNode AsBlueprintNodeMainExecution(this BlueprintNodeMainExecution execution, string name)
|
||||
{
|
||||
if (execution == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(execution));
|
||||
}
|
||||
var attributeArray = execution.Method.GetCustomAttributes(typeof(BpNodeActionAttribute), false);
|
||||
var attri = (BpNodeActionAttribute)attributeArray[0];
|
||||
if ( attributeArray.Length < 0 || attri == null)
|
||||
{
|
||||
throw new InvalidCastException($"Delegate {nameof(execution)} is not marked by {typeof(BpNodeActionAttribute)}");
|
||||
}
|
||||
if (attri.OperationSpan <= 1)
|
||||
{
|
||||
return new DefaultConvertableToBlueprintNode();
|
||||
}
|
||||
return new CrossFrameOperation(
|
||||
|
||||
);
|
||||
}
|
||||
}//--------------------------------- end of class -----------------------------------
|
||||
|
||||
public interface IConvertableToBlueprintNode
|
||||
{
|
||||
#pragma warning disable CA1819
|
||||
public string[] InputInterfacesName { get; }
|
||||
#pragma warning restore CA1819
|
||||
|
||||
|
||||
#pragma warning disable CA1819
|
||||
public string[] OutputInterfacesName { get; }
|
||||
#pragma warning restore CA1819
|
||||
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void ExecuteMain(
|
||||
in Dictionary<string, BlueprintPipeline> input,
|
||||
in Dictionary<string, BlueprintPipeline> output);
|
||||
}
|
||||
|
||||
|
||||
public class BlueprintNodeRunException : Exception
|
||||
{
|
||||
|
||||
protected BlueprintNodeRunException(SerializationInfo info, StreamingContext context) : base(info, context)
|
||||
{
|
||||
}
|
||||
|
||||
public BlueprintNodeRunException()
|
||||
{
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user