using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using PXP.Crawler.API.Model;

namespace PXP.Crawler.API.Plugins.Operators
{
    [NodeInfo("Equals (String)", typeof(CompareStringsNode), Category = "Operators",
        DefaultWidth = 100, DefaultHeight = 40)]
    public class CompareStringsNode : CompareValuesNodeBase<string>
    {
        public CompareStringsNode(Program program) : base(program)
        {
            Name = "Equals";
            value1 = "";
            value2 = "";
        }

        protected internal override bool CompareValues()
        {
            if (value1.Length != value2.Length)
                return false;

            return value1 == value2;
        }
    }
}
