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:
parent
e54e791062
commit
a92c0adaf4
@ -2,7 +2,7 @@
|
||||
|
||||
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))]
|
||||
public class StringNullOrWhiteSpaceNode : Node
|
||||
{
|
||||
@ -10,20 +10,20 @@ public class StringNullOrWhiteSpaceNode : Node
|
||||
: base("Null or White Space", "Returns true if null or white space")
|
||||
{
|
||||
Input1 = CreateInputPin<string>();
|
||||
TrueResult = CreateOutputPin<bool>("true (Empty)");
|
||||
FalseResult = CreateOutputPin<bool>("false (Not Empty)");
|
||||
NullOrWhiteSpaceResult = CreateOutputPin<bool>("White Space");
|
||||
HasContentResult = CreateOutputPin<bool>("Has Content");
|
||||
}
|
||||
|
||||
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()
|
||||
{
|
||||
bool isNullOrWhiteSpace = string.IsNullOrWhiteSpace(Input1.Value);
|
||||
TrueResult.Value = isNullOrWhiteSpace;
|
||||
FalseResult.Value = !isNullOrWhiteSpace;
|
||||
NullOrWhiteSpaceResult.Value = isNullOrWhiteSpace;
|
||||
HasContentResult.Value = !isNullOrWhiteSpace;
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user