Exemple #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ComplexField"/> class.
 /// </summary>
 /// <param name="name">The name of the field, which must be unique within the index or parent field.</param>
 /// <param name="collection">Whether the field is a collection of strings.</param>
 /// <exception cref="ArgumentException"><paramref name="name"/> is an empty string.</exception>
 /// <exception cref="ArgumentNullException"><paramref name="name"/> is null.</exception>
 public ComplexField(string name, bool collection = false) : base(name, collection ? SearchFieldDataType.Collection(SearchFieldDataType.Complex) : SearchFieldDataType.Complex)
 {
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="SearchableField"/> class.
 /// </summary>
 /// <param name="name">The name of the field, which must be unique within the index or parent field.</param>
 /// <param name="collection">Whether the field is a collection of strings.</param>
 /// <exception cref="ArgumentException"><paramref name="name"/> is an empty string.</exception>
 /// <exception cref="ArgumentNullException"><paramref name="name"/> is null.</exception>
 public SearchableField(string name, bool collection = false) : base(name, collection ? SearchFieldDataType.Collection(SearchFieldDataType.String) : SearchFieldDataType.String)
 {
     // NOTE: Types other than string may be searchable one day. Could add an overload in the future.
 }