40 lines
1.4 KiB
C#
40 lines
1.4 KiB
C#
using NodePipeline.Abstractions.Attributes;
|
|
using NodePipeline.Abstractions.Interfaces.Nodes;
|
|
using NodePipeline.Abstractions.Models;
|
|
using NodePipeline.Engine.CodeGeneration.Abstractions.Models;
|
|
|
|
// ReSharper disable UnusedAutoPropertyAccessor.Global
|
|
|
|
namespace NodePipeline.Engine.Tests.CodeGeneratorTests.Fixtures.MockNodes;
|
|
|
|
public class OneParameterWithoutParameterlessConstructorNode : INode
|
|
{
|
|
[NodeField(FieldDirection.Parameter)] public NodeField<SomeComplexClass> Parameter { get; set; } = null!;
|
|
|
|
public void Execute()
|
|
{
|
|
throw new NotImplementedException();
|
|
}
|
|
|
|
internal static NodeDescriptor GetDescriptor()
|
|
{
|
|
return new NodeDescriptor(nameof(OneParameterWithoutParameterlessConstructorNode), false,
|
|
typeof(OneParameterWithoutParameterlessConstructorNode).FullName!,
|
|
typeof(OneParameterWithoutParameterlessConstructorNode).FullName!,
|
|
[
|
|
new NodeFieldDescriptor(nameof(Parameter), nameof(Parameter), typeof(int).FullName!, false, true, false,
|
|
FieldDirection.Parameter,
|
|
new NodeFieldDescriptor.NodeFieldMetaData(false, canDefaultValueBeInitialized: false))
|
|
], true, null);
|
|
}
|
|
}
|
|
|
|
public class SomeComplexClass
|
|
{
|
|
public SomeComplexClass(string value)
|
|
{
|
|
Value = value;
|
|
}
|
|
|
|
public string Value { get; private set; }
|
|
} |