IsNullOrWhiteSpace


Node Information
Inicates whether the specified string null or empty.
General Information
• This node doesn't have other available options.
Visual
Visual

Ports
Text Type DataType Accepts IsList CustomAcception
Check IN RUN ONE FALSE FALSE
Text IN String ONE FALSE FALSE
True OUT RUN MULTIPLE FALSE FALSE
False OUT RUN MULTIPLE FALSE FALSE

Source
namespace Korduene.KGraph.Nodes.String
{
    [IsNode("IsNullOrWhiteSpace")]
    public class StringIsNullOrWhiteSpaceCheck : Node
    {
        Port chk = new Port(PortType.IN, typeof(RUN), AcceptsLinks.ONE, "Check");
        Port a = new Port(PortType.IN, typeof(string), AcceptsLinks.ONE, "Text");
        Port tr = new Port(PortType.OUT, typeof(RUN), AcceptsLinks.MULTIPLE, "True");
        Port fl = new Port(PortType.OUT, typeof(RUN), AcceptsLinks.MULTIPLE, "False");
        public string String
        {
            set { a.Value = value; }
            get { return GetRuntimeValue(a); }
        }
        public StringIsNullOrWhiteSpaceCheck()
        {
            NodeType = KGraph.NodeType.Method;
            this.Name = "IsNullOrWhiteSpace";
            AddPort(chk);
            AddPort(a);
            AddPort(tr);
            AddPort(fl);
            Information = "Inicates whether the specified string null or empty.";
        }
        public override string Code()
        {
            return "if(string.IsNullOrWhiteSpace(" + GetValue(a) + ")){ " + GetValue(tr) + " } else { " + GetValue(fl) + " }";
        }
    }
}