/// <summary> /// Sets the sort to the terms in each field in succession. /// </summary> /// <param name="fieldnames">The fieldnames.</param> public virtual void SetSort(System.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(System.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 }; }