Пример #1
0
            public override string GetExpressionString()
            {
                StringBuilder sb = new StringBuilder();

                for (int i = 0; i < _childNodes.Count; i++)
                {
                    if (i > 0)
                    {
                        sb.AppendFormat(" {0} ", OperatorName);
                    }
                    ConditionNode child = (ConditionNode)_childNodes[i];

                    string formatString;
                    if (child is LogicalNode)
                    {
                        formatString = "({0})";
                    }
                    else
                    {
                        formatString = "{0}";
                    }

                    sb.AppendFormat(formatString, child.GetExpressionString());
                }
                return(sb.ToString());
            }
Пример #2
0
        public string GetExpressionString()
        {
            if (!HasExpression)
            {
                return(string.Empty);
            }

            return(_topNode.GetExpressionString());
        }