daily update on 20240528 by nitload youmu

This commit is contained in:
Nitload
2024-05-28 17:45:54 +08:00
parent de399e22c2
commit 70890e3e33
88 changed files with 10678 additions and 5761 deletions
+23 -21
View File
@@ -9,11 +9,12 @@ using System.Threading.Tasks;
namespace StgSharp.Logic
{
internal sealed class BeginningNode:BlueprintNode
internal sealed class BeginningNode : BlueprintNode
{
public BeginningNode():base(name : "BeginningNode",null,
public BeginningNode() : base(name: "BeginningNode", null,
true, ["default"], ["default"]
) { }
)
{ }
internal (string name, BlueprintPipelineArgs arg)[] InputData
{
@@ -25,60 +26,61 @@ namespace StgSharp.Logic
}
foreach (var parameter in value)
{
OutputInterfaces[parameter.name].Value = parameter.arg;
OutputInterfaces[parameter.name].Args = parameter.arg;
}
}
}
public new void SetCertainOutputPort(string name, BlueprintPipeline pipeline)
{
if (outputInterfaces.ContainsKey(name))
if (_outputInterfaces.ContainsKey(name))
{
outputInterfaces[name] = pipeline;
_outputInterfaces[name] = pipeline;
}
outputInterfaces.Add(name,pipeline);
_outputInterfaces.Add(name, pipeline);
}
public new void Run()
{
BlueprintPipeline.SkipAll(outputInterfaces);
BlueprintPipeline.SkipAll(_outputInterfaces);
}
}
internal sealed class EndingNode : BlueprintNode
{
public EndingNode():base(name:"EndingNode",
public EndingNode() : base(name: "EndingNode",
operation: (
in Dictionary<string , BlueprintPipeline> input,
in Dictionary<string, BlueprintPipeline> input,
in Dictionary<string, BlueprintPipeline> output
) =>
) =>
{
},
true, ["default"], ["default"]
) { }
)
{ }
internal (string name, BlueprintPipelineArgs arg)[] OutputData
{
get
{
get
{
return InputInterfaces.Select(
key => (key.Key, key.Value.Value) ).
key => (key.Key, key.Value.Args)).
ToArray();
}
}
public new void SetCertainInputPort(string name, BlueprintPipeline pipeline)
{
if (inputInterfaces.ContainsKey(name))
if (_inputInterfaces.ContainsKey(name))
{
inputInterfaces[name] = pipeline;
_inputInterfaces[name] = pipeline;
}
inputInterfaces.Add(name, pipeline);
_inputInterfaces.Add(name, pipeline);
}
public new void Run()
public new void Run()
{
BlueprintPipeline.WaitAll(inputInterfaces);
BlueprintPipeline.WaitAll(_inputInterfaces);
}
}
}
}