| | 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 | | using System; |
| | 6 | | using Microsoft.Azure.Search.Models; |
| | 7 | |
|
| | 8 | | namespace Microsoft.Azure.Search |
| | 9 | | { |
| | 10 | | /// <summary> |
| | 11 | | /// Indicates that the <see cref="Field"/> generated by <see cref="FieldBuilder"/> for |
| | 12 | | /// the target property should have its <see cref="Field.Analyzer"/> property set to the |
| | 13 | | /// specified analyzer. |
| | 14 | | /// </summary> |
| | 15 | | [AttributeUsage(AttributeTargets.Property)] |
| | 16 | | public class AnalyzerAttribute : Attribute |
| | 17 | | { |
| | 18 | | /// <summary> |
| | 19 | | /// Indicates that the specified analyzer should be used. |
| | 20 | | /// </summary> |
| | 21 | | /// <param name="analyzerName"> |
| | 22 | | /// The name of the analyzer. Use one of the names in <c cref="AnalyzerName.AsString">AnalyzerName.AsString</c> |
| | 23 | | /// or the name of a custom analyzer. |
| | 24 | | /// </param> |
| 9888 | 25 | | public AnalyzerAttribute(string analyzerName) |
| | 26 | | { |
| 9888 | 27 | | Name = analyzerName; |
| 9888 | 28 | | } |
| | 29 | |
|
| | 30 | | /// <summary> |
| | 31 | | /// The name of the analyzer. |
| | 32 | | /// </summary> |
| 5328 | 33 | | public string Name { get; } |
| | 34 | | } |
| | 35 | | } |