1
0
mirror of https://github.com/Artemis-RGB/Artemis synced 2025-12-13 05:48:35 +00:00

update output namings

This commit is contained in:
aytac.kayadelen 2022-08-24 12:02:26 +03:00
parent e54e791062
commit a92c0adaf4

View File

@ -2,7 +2,7 @@
namespace Artemis.VisualScripting.Nodes.Text; namespace Artemis.VisualScripting.Nodes.Text;
[Node("String Null or WhiteSpace", "Checks whether the string is null or white space.", [Node("String Null or WhiteSpace", "Checks whether the string is null, empty or white space.",
"Text", InputType = typeof(string), OutputType = typeof(bool))] "Text", InputType = typeof(string), OutputType = typeof(bool))]
public class StringNullOrWhiteSpaceNode : Node public class StringNullOrWhiteSpaceNode : Node
{ {
@ -10,20 +10,20 @@ public class StringNullOrWhiteSpaceNode : Node
: base("Null or White Space", "Returns true if null or white space") : base("Null or White Space", "Returns true if null or white space")
{ {
Input1 = CreateInputPin<string>(); Input1 = CreateInputPin<string>();
TrueResult = CreateOutputPin<bool>("true (Empty)"); NullOrWhiteSpaceResult = CreateOutputPin<bool>("White Space");
FalseResult = CreateOutputPin<bool>("false (Not Empty)"); HasContentResult = CreateOutputPin<bool>("Has Content");
} }
public InputPin<string> Input1 { get; } public InputPin<string> Input1 { get; }
public OutputPin<bool> TrueResult { get; } public OutputPin<bool> NullOrWhiteSpaceResult { get; }
public OutputPin<bool> FalseResult { get; } public OutputPin<bool> HasContentResult { get; }
public override void Evaluate() public override void Evaluate()
{ {
bool isNullOrWhiteSpace = string.IsNullOrWhiteSpace(Input1.Value); bool isNullOrWhiteSpace = string.IsNullOrWhiteSpace(Input1.Value);
TrueResult.Value = isNullOrWhiteSpace; NullOrWhiteSpaceResult.Value = isNullOrWhiteSpace;
FalseResult.Value = !isNullOrWhiteSpace; HasContentResult.Value = !isNullOrWhiteSpace;
} }
} }