| | 1 | | // Copyright (c) Microsoft Corporation. All rights reserved. |
| | 2 | | // Licensed under the MIT License. See License.txt in the project root for |
| | 3 | | // license information. |
| | 4 | |
|
| | 5 | | namespace Microsoft.Azure.Search.Models |
| | 6 | | { |
| | 7 | | using System.Collections.Generic; |
| | 8 | | using Common; |
| | 9 | |
|
| | 10 | | internal struct QueryOption |
| | 11 | | { |
| 0 | 12 | | public QueryOption(string name, string value) : this() |
| | 13 | | { |
| 0 | 14 | | Name = name; |
| 0 | 15 | | Value = value; |
| 0 | 16 | | } |
| | 17 | |
|
| 0 | 18 | | public QueryOption(string name, IEnumerable<string> values) : this(name, values.ToCommaSeparatedString()) |
| | 19 | | { |
| | 20 | | // Do nothing. |
| 0 | 21 | | } |
| | 22 | |
|
| 0 | 23 | | public string Name { get; } |
| | 24 | |
|
| 0 | 25 | | public string Value { get; } |
| | 26 | |
|
| 0 | 27 | | public override string ToString() => $"{Name}={Value}"; |
| | 28 | | } |
| | 29 | | } |