| | 1 | | // Copyright (c) Microsoft Corporation. All rights reserved. |
| | 2 | | // Licensed under the MIT License. |
| | 3 | |
|
| | 4 | | // <auto-generated/> |
| | 5 | |
|
| | 6 | | #nullable disable |
| | 7 | |
|
| | 8 | | using System; |
| | 9 | | using System.Collections.Generic; |
| | 10 | | using System.Linq; |
| | 11 | |
|
| | 12 | | namespace Azure.Search.Documents.Indexes.Models |
| | 13 | | { |
| | 14 | | /// <summary> The result of testing an analyzer on text. </summary> |
| | 15 | | internal partial class AnalyzeResult |
| | 16 | | { |
| | 17 | | /// <summary> Initializes a new instance of AnalyzeResult. </summary> |
| | 18 | | /// <param name="tokens"> The list of tokens returned by the analyzer specified in the request. </param> |
| | 19 | | /// <exception cref="ArgumentNullException"> <paramref name="tokens"/> is null. </exception> |
| 0 | 20 | | internal AnalyzeResult(IEnumerable<AnalyzedTokenInfo> tokens) |
| | 21 | | { |
| 0 | 22 | | if (tokens == null) |
| | 23 | | { |
| 0 | 24 | | throw new ArgumentNullException(nameof(tokens)); |
| | 25 | | } |
| | 26 | |
|
| 0 | 27 | | Tokens = tokens.ToList(); |
| 0 | 28 | | } |
| | 29 | |
|
| | 30 | | /// <summary> Initializes a new instance of AnalyzeResult. </summary> |
| | 31 | | /// <param name="tokens"> The list of tokens returned by the analyzer specified in the request. </param> |
| 2 | 32 | | internal AnalyzeResult(IReadOnlyList<AnalyzedTokenInfo> tokens) |
| | 33 | | { |
| 2 | 34 | | Tokens = tokens; |
| 2 | 35 | | } |
| | 36 | |
|
| | 37 | | /// <summary> The list of tokens returned by the analyzer specified in the request. </summary> |
| 2 | 38 | | public IReadOnlyList<AnalyzedTokenInfo> Tokens { get; } |
| | 39 | | } |
| | 40 | | } |