コード例 #1
0
        /// <summary>
        /// Sets the sort to the terms in each field in succession.
        /// </summary>
        /// <param name="fieldNames">The fieldnames.</param>
        public virtual void SetSort(string[] fieldNames)
        {
            int n = fieldNames.Length;

            SearchSortField[] nfields = new SearchSortField[n];
            for (int i = 0; i < n; ++i)
            {
                nfields[i] = new SearchSortField(fieldNames[i]);
            }

            _Fields = nfields;
        }
コード例 #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SearchSort"/> class.
 /// </summary>
 /// <param name="field">The field.</param>
 public SearchSort(SearchSortField field)
 {
     SetSort(field);
 }
コード例 #3
0
 /// <summary>
 /// Sets the sort.
 /// </summary>
 /// <param name="field">The field.</param>
 /// <param name="isDescending">if set to <c>true</c> [is descending].</param>
 public virtual void SetSort(string field, bool isDescending)
 {
     SearchSortField[] nfields = new SearchSortField[] { new SearchSortField(field, isDescending) };
     _Fields = nfields;
 }
コード例 #4
0
        /// <summary>
        /// Sets the sort to the terms in each field in succession.
        /// </summary>
        /// <param name="fieldNames">The fieldnames.</param>
        public virtual void SetSort(string[] fieldNames)
        {
            int n = fieldNames.Length;

            SearchSortField[] nfields = new SearchSortField[n];
            for (int i = 0; i < n; ++i)
            {
                nfields[i] = new SearchSortField(fieldNames[i]);
            }

            _Fields = nfields;
        }
コード例 #5
0
 /// <summary>
 /// Sets the sort to the given criteria.
 /// </summary>
 /// <param name="field">The field.</param>
 public virtual void SetSort(SearchSortField field)
 {
     this._Fields = new SearchSortField[] { field };
 }
コード例 #6
0
 /// <summary>
 /// Sets the sort.
 /// </summary>
 /// <param name="field">The field.</param>
 /// <param name="isDescending">if set to <c>true</c> [is descending].</param>
 public virtual void SetSort(string field, bool isDescending)
 {
     SearchSortField[] nfields = new SearchSortField[] { new SearchSortField(field, isDescending) };
     _Fields = nfields;
 }
コード例 #7
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SearchSort"/> class.
 /// </summary>
 /// <param name="fields">The fields.</param>
 public SearchSort(SearchSortField[] fields)
 {
     SetSort(fields);
 }
コード例 #8
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SearchSort"/> class.
 /// </summary>
 /// <param name="field">The field.</param>
 public SearchSort(SearchSortField field)
 {
     SetSort(field);
 }
コード例 #9
0
 /// <summary>
 /// Sets the sort.
 /// </summary>
 /// <param name="fields">The fields.</param>
 public virtual void SetSort(SearchSortField[] fields)
 {
     _Fields = fields;
 }
コード例 #10
0
 /// <summary>
 /// Sets the sort to the given criteria.
 /// </summary>
 /// <param name="field">The field.</param>
 public virtual void SetSort(SearchSortField field)
 {
     this._Fields = new SearchSortField[] { field };
 }