Ejemplo n.º 1
0
 public override string ToSource()
 {
     return(string.Format
            (
                "({0}.Is{1}Than({2}))",
                FirstPart.ToSource(),
                ConditionText,
                SecondPart.ToSource()
            ));
 }
Ejemplo n.º 2
0
        public override string ToSource()
        {
            string firstPartStr  = FirstPart?.ToSource();
            string secondPartStr = SecondPart?.ToSource();

            if (!(FirstPart is GNumber))
            {
                firstPartStr += ".ToNumber()";
            }

            if (!(SecondPart is GNumber))
            {
                secondPartStr += ".ToNumber()";
            }

            return(string.Format("({0} {1} {2})", firstPartStr, OperatorText, secondPartStr));
        }
Ejemplo n.º 3
0
        public override string ToSource()
        {
            string firstPartStr  = FirstPart?.ToSource();
            string secondPartStr = SecondPart?.ToSource();

            if (!(FirstPart is GLogic))
            {
                firstPartStr += ".ToBool()";
            }

            if (!(SecondPart is GLogic))
            {
                secondPartStr += ".ToBool()";
            }


            return(string.Format
                   (
                       "({0} {1} {2})",
                       firstPartStr,
                       GateText,
                       secondPartStr
                   ));
        }