ParseSortString() 개인적인 메소드

private ParseSortString ( string sortString ) : IndexField[]
sortString string
리턴 IndexField[]
예제 #1
0
        // This is method is internal to
        // the Mono implementation of DataView; it
        // is not to be used from your code.
        //
        // Update the DataRowView array which is an index cache
        // into the DataTable's DataRowCollection.
        //
        // I assume this is what UpdateIndex is used for
        protected virtual void UpdateIndex(bool force)
        {
            if (Table == null)
            {
                // FIXME
                return;
            }

            if (Index == null || force)
            {
                sortColumns = DataTable.ParseSortString(Table, Sort, out sortOrder, false);
                Index       = dataTable.GetIndex(sortColumns, sortOrder, RowStateFilter, FilterExpression, true);
            }
            else
            {
                Index.Key.RowStateFilter = RowStateFilter;
                Index.Reset();
            }

            int[] records = Index.GetAll();

            if (records != null)
            {
                InitDataRowViewArray(records, Index.Size);
            }
            else
            {
                rowCache = new DataRowView [0];
            }
        }
예제 #2
0
 public Select(DataTable table, string filterExpression, string sort, DataViewRowState recordStates) {
     this.table = table;
     IndexFields = table.ParseSortString(sort);
     if (filterExpression != null && filterExpression.Length > 0) {
         this.rowFilter = new DataExpression(this.table, filterExpression);
         this.expression = this.rowFilter.ExpressionNode;
     }
     this.recordStates = recordStates;
 }
예제 #3
0
 public Select(DataTable table, string?filterExpression, string?sort, DataViewRowState recordStates)
 {
     _table       = table;
     _indexFields = table.ParseSortString(sort);
     if (filterExpression != null && filterExpression.Length > 0)
     {
         _rowFilter  = new DataExpression(_table, filterExpression);
         _expression = _rowFilter.ExpressionNode;
     }
     _recordStates = recordStates;
 }
예제 #4
0
파일: Select.cs 프로젝트: dotnet/corefx
 public Select(DataTable table, string filterExpression, string sort, DataViewRowState recordStates)
 {
     _table = table;
     _indexFields = table.ParseSortString(sort);
     if (filterExpression != null && filterExpression.Length > 0)
     {
         _rowFilter = new DataExpression(_table, filterExpression);
         _expression = _rowFilter.ExpressionNode;
     }
     _recordStates = recordStates;
 }
예제 #5
0
 public Select(DataTable table, string filterExpression, string sort, DataViewRowState recordStates)
 {
     this.table  = table;
     IndexFields = table.ParseSortString(sort);
     if (filterExpression != null && filterExpression.Length > 0)
     {
         this.rowFilter  = new DataExpression(this.table, filterExpression);
         this.expression = this.rowFilter.ExpressionNode;
     }
     this.recordStates = recordStates;
 }
예제 #6
0
 public Select(DataTable table, string filterExpression, string sort, DataViewRowState recordStates)
 {
     this.table     = table;
     this.indexDesc = table.ParseSortString(sort);
     if (filterExpression != null && filterExpression.Length > 0)
     {
         this.rowFilter  = new DataFilter(filterExpression, this.table);
         this.expression = this.rowFilter.expr;
     }
     this.recordStates = recordStates;
 }