/// <summary> /// Convert an enum of type SuggesterSearchMode to a string. /// </summary> /// <param name='value'> /// The value to convert to a string. /// </param> /// <returns> /// The enum value as a string. /// </returns> internal static string SuggesterSearchModeToString(SuggesterSearchMode value) { if (value == SuggesterSearchMode.AnalyzingInfixMatching) { return("analyzingInfixMatching"); } throw new ArgumentOutOfRangeException("value"); }
internal static string ToSerializedValue(this SuggesterSearchMode value) { switch (value) { case SuggesterSearchMode.AnalyzingInfixMatching: return("analyzingInfixMatching"); } return(null); }
/// <summary> /// Initializes a new instance of the Suggester class with required /// arguments. /// </summary> public Suggester(string name, SuggesterSearchMode searchMode) : this() { if (name == null) { throw new ArgumentNullException("name"); } this.Name = name; this.SearchMode = searchMode; }
/// <summary> /// Initializes a new instance of the Suggester class with required /// arguments. /// </summary> public Suggester(string name, SuggesterSearchMode searchMode, IList <string> sourceFields) : this() { if (name == null) { throw new ArgumentNullException("name"); } if (sourceFields == null) { throw new ArgumentNullException("sourceFields"); } this.Name = name; this.SearchMode = searchMode; this.SourceFields = sourceFields; }
/// <summary> /// Initializes a new instance of the Suggester class with required /// arguments. /// </summary> public Suggester(string name, SuggesterSearchMode searchMode, IList<string> sourceFields) : this() { if (name == null) { throw new ArgumentNullException("name"); } if (sourceFields == null) { throw new ArgumentNullException("sourceFields"); } this.Name = name; this.SearchMode = searchMode; this.SourceFields = sourceFields; }
/// <summary> /// Initializes a new instance of the Suggester class with required /// arguments. /// </summary> /// <param name="name">The name of the suggester.</param> /// <param name="searchMode">A value indicating the capabilities of the suggester.</param> /// <param name="sourceFields">The list of field names to which the suggester applies; Each field must be /// searchable.</param> public Suggester(string name, SuggesterSearchMode searchMode, params string[] sourceFields) : this(name, searchMode, (IList<string>)sourceFields) { }
/// <summary> /// Initializes a new instance of the Suggester class with required /// arguments. /// </summary> /// <param name="name">The name of the suggester.</param> /// <param name="searchMode">A value indicating the capabilities of the suggester.</param> /// <param name="sourceFields">The list of field names to which the suggester applies; Each field must be /// searchable.</param> public Suggester(string name, SuggesterSearchMode searchMode, params string[] sourceFields) : this(name, searchMode, sourceFields.ToList()) { // Do nothing. }
/// <summary> /// Initializes a new instance of the Suggester class with required /// arguments. /// </summary> /// <param name="name">The name of the suggester.</param> /// <param name="searchMode">A value indicating the capabilities of the suggester.</param> /// <param name="sourceFields">The list of field names to which the suggester applies; Each field must be /// searchable.</param> public Suggester(string name, SuggesterSearchMode searchMode, params string[] sourceFields) : this(name, searchMode, (IList <string>)sourceFields) { }
/// <summary> /// Initializes a new instance of the Suggester class. /// </summary> public Suggester(string name, SuggesterSearchMode searchMode, IList <string> sourceFields) { Name = name; SearchMode = searchMode; SourceFields = sourceFields; }