示例#1
0
        internal void VisitQueryOptionExpression(OrderByQueryOptionExpression oboe)
        {
            this.uriBuilder.Append(UriHelper.DOLLARSIGN);
            this.uriBuilder.Append(UriHelper.OPTIONORDERBY);
            this.uriBuilder.Append(UriHelper.EQUALSSIGN);

            int ii = 0;

            while (true)
            {
                var selector = oboe.Selectors[ii];

                this.uriBuilder.Append(this.ExpressionToString(selector.Expression));
                if (selector.Descending)
                {
                    this.uriBuilder.Append(UriHelper.SPACE);
                    this.uriBuilder.Append(UriHelper.OPTIONDESC);
                }

                if (++ii == oboe.Selectors.Count)
                {
                    break;
                }

                this.uriBuilder.Append(UriHelper.COMMA);
            }
        }
示例#2
0
        /// <summary>
        /// OrderByQueryOptionExpression visit method.
        /// </summary>
        /// <param name="oboe">OrderByQueryOptionExpression expression to visit</param>
        internal void VisitQueryOptionExpression(OrderByQueryOptionExpression oboe)
        {
            StringBuilder tmpBuilder = new StringBuilder();
            int           ii         = 0;

            while (true)
            {
                var selector = oboe.Selectors[ii];

                tmpBuilder.Append(this.ExpressionToString(selector.Expression, /*inPath*/ false));
                if (selector.Descending)
                {
                    tmpBuilder.Append(UriHelper.SPACE);
                    tmpBuilder.Append(UriHelper.OPTIONDESC);
                }

                if (++ii == oboe.Selectors.Count)
                {
                    break;
                }

                tmpBuilder.Append(UriHelper.COMMA);
            }

            this.AddAsCachedQueryOption(UriHelper.DOLLARSIGN + UriHelper.OPTIONORDERBY, tmpBuilder.ToString());
        }
示例#3
0
        internal void VisitQueryOptionExpression(OrderByQueryOptionExpression oboe)
        {
            this.uriBuilder.Append('$');
            this.uriBuilder.Append("orderby");
            this.uriBuilder.Append('=');
            int num = 0;

            while (true)
            {
                OrderByQueryOptionExpression.Selector selector = oboe.Selectors[num];
                this.uriBuilder.Append(this.ExpressionToString(selector.Expression));
                if (selector.Descending)
                {
                    this.uriBuilder.Append(' ');
                    this.uriBuilder.Append("desc");
                }
                if (++num == oboe.Selectors.Count)
                {
                    return;
                }
                this.uriBuilder.Append(',');
            }
        }
示例#4
0
        internal void VisitQueryOptionExpression(OrderByQueryOptionExpression oboe)
        {
            this.uriBuilder.Append(UriHelper.DOLLARSIGN);
            this.uriBuilder.Append(UriHelper.OPTIONORDERBY);
            this.uriBuilder.Append(UriHelper.EQUALSSIGN);

            int ii = 0;
            while (true)
            {
                var selector = oboe.Selectors[ii];

                this.uriBuilder.Append(this.ExpressionToString(selector.Expression));
                if (selector.Descending)
                {
                    this.uriBuilder.Append(UriHelper.SPACE);
                    this.uriBuilder.Append(UriHelper.OPTIONDESC);
                }

                if (++ii == oboe.Selectors.Count)
                {
                    break;
                }

                this.uriBuilder.Append(UriHelper.COMMA);
            }
        }
示例#5
0
 internal void VisitQueryOptionExpression(OrderByQueryOptionExpression oboe)
 {
     this.uriBuilder.Append('$');
     this.uriBuilder.Append("orderby");
     this.uriBuilder.Append('=');
     int num = 0;
     while (true)
     {
         OrderByQueryOptionExpression.Selector selector = oboe.Selectors[num];
         this.uriBuilder.Append(this.ExpressionToString(selector.Expression));
         if (selector.Descending)
         {
             this.uriBuilder.Append(' ');
             this.uriBuilder.Append("desc");
         }
         if (++num == oboe.Selectors.Count)
         {
             return;
         }
         this.uriBuilder.Append(',');
     }
 }