/// <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; }
/// <summary> /// Initializes a new instance of the <see cref="SearchSort"/> class. /// </summary> /// <param name="field">The field.</param> public SearchSort(SearchSortField field) { SetSort(field); }
/// <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; }
/// <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 }; }
/// <summary> /// Initializes a new instance of the <see cref="SearchSort"/> class. /// </summary> /// <param name="fields">The fields.</param> public SearchSort(SearchSortField[] fields) { SetSort(fields); }
/// <summary> /// Sets the sort. /// </summary> /// <param name="fields">The fields.</param> public virtual void SetSort(SearchSortField[] fields) { _Fields = fields; }