IsNullOrEmpty Expression


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
Text IN String ONE FALSE FALSE
Result OUT Boolean MULTIPLE FALSE FALSE

Source
namespace Korduene.KGraph.Nodes.String
{
    [IsNode("IsNullOrEmpty Expression")]
    public class StringIsNullOrEmpty : Node
    {
        Port a = new Port(PortType.IN, typeof(string), AcceptsLinks.ONE, "Text");
        Port length = new Port(PortType.OUT, typeof(bool), AcceptsLinks.MULTIPLE, "Result");
        public string String
        {
            set { a.Value = value; }
            get { return GetRuntimeValue(a); }
        }
        public StringIsNullOrEmpty()
        {
            Name = "IsNullOrEmpty Expression";
            AddPort(a);
            AddPort(length);
            length.Instructions = "init";
            Information = "Inicates whether the specified string null or empty.";
        }
        public override void UpdateResults()
        {
            length.Instructions = "string.IsNullOrEmpty(" + GetValue(a) + ")";
        }
    }
}