コード例 #1
0
 public void AddSort(Query evalQuery, IComparer comparer)
 {
     if (this.numSorts == this.expressions.Length)
     {
         Query[]     queryArray    = new Query[this.numSorts * 2];
         IComparer[] comparerArray = new IComparer[this.numSorts * 2];
         for (int i = 0; i < this.numSorts; i++)
         {
             queryArray[i]    = this.expressions[i];
             comparerArray[i] = this.comparers[i];
         }
         this.expressions = queryArray;
         this.comparers   = comparerArray;
     }
     if ((evalQuery.StaticType == XPathResultType.NodeSet) || (evalQuery.StaticType == XPathResultType.Any))
     {
         evalQuery = new StringFunctions(Function.FunctionType.FuncString, new Query[] { evalQuery });
     }
     this.expressions[this.numSorts] = evalQuery;
     this.comparers[this.numSorts]   = comparer;
     this.numSorts++;
 }