/// <summary> Indicate whether to load the field with the given name or not. If the <see cref="AbstractField.Name()" /> is not in either of the /// initializing Sets, then <see cref="Lucene.Net.Documents.FieldSelectorResult.NO_LOAD" /> is returned. If a Field name /// is in both <c>fieldsToLoad</c> and <c>lazyFieldsToLoad</c>, lazy has precedence. /// /// </summary> /// <param name="fieldName">The <see cref="Field" /> name to check /// </param> /// <returns> The <see cref="FieldSelectorResult" /> /// </returns> public virtual FieldSelectorResult Accept(System.String fieldName) { FieldSelectorResult result = FieldSelectorResult.NO_LOAD; if (fieldsToLoad.Contains(fieldName) == true) { result = FieldSelectorResult.LOAD; } if (lazyFieldsToLoad.Contains(fieldName) == true) { result = FieldSelectorResult.LAZY_LOAD; } return(result); }
public override bool Equals(System.Object o) { if (this == o) { return(true); } if (o == null || GetType() != o.GetType()) { return(false); } FieldSelectorResult that = (FieldSelectorResult)o; if (id != that.id) { return(false); } return(true); }
/// <summary>Load field according to its associated value in fieldSelections</summary> /// <param name="field">a field name /// </param> /// <returns> the fieldSelections value that field maps to or NO_LOAD if none. /// </returns> public virtual FieldSelectorResult Accept(System.String field) { FieldSelectorResult selection = (FieldSelectorResult)fieldSelections[field]; return(selection != null ? selection : FieldSelectorResult.NO_LOAD); }
/// <summary>Load field according to its associated value in fieldSelections</summary> /// <param name="field">a field name /// </param> /// <returns> the fieldSelections value that field maps to or NO_LOAD if none. /// </returns> public virtual FieldSelectorResult Accept(System.String field) { FieldSelectorResult selection = fieldSelections[field]; return(selection != FieldSelectorResult.INVALID ? selection : FieldSelectorResult.NO_LOAD); // TODO: See FieldSelectorResult }
/// <summary>Load field according to its associated value in fieldSelections</summary> /// <param name="field">a field name /// </param> /// <returns> the fieldSelections value that field maps to or NO_LOAD if none. /// </returns> public virtual FieldSelectorResult Accept(System.String field) { FieldSelectorResult selection = FieldSelectorResult.NO_LOAD; return(fieldSelections.TryGetValue(field, out selection) != false ? selection : FieldSelectorResult.NO_LOAD); }